mirror of
https://github.com/irssi/irssi.git
synced 2026-08-20 00:52:30 +02:00
cmd_options_get_server() : allow NULL cmd argument
eval_special_string() : if any of the commands separated with ; used the arguments ($0, $1, etc.) don't anymore append all the arguments after other commands. git-svn-id: http://svn.irssi.org/repos/irssi/trunk@903 dbcabf3a-b0e7-0310-adc4-f8d773084564
This commit is contained in:
parent
2ea411093a
commit
a01275959d
2 changed files with 28 additions and 12 deletions
|
|
@ -429,12 +429,14 @@ SERVER_REC *cmd_options_get_server(const char *cmd,
|
|||
/* get all the options, then remove the known ones. there should
|
||||
be only one left - the server tag. */
|
||||
list = hashtable_get_keys(optlist);
|
||||
for (tmp = list; tmp != NULL; tmp = next) {
|
||||
char *option = tmp->data;
|
||||
next = tmp->next;
|
||||
if (cmd != NULL) {
|
||||
for (tmp = list; tmp != NULL; tmp = next) {
|
||||
char *option = tmp->data;
|
||||
next = tmp->next;
|
||||
|
||||
if (command_have_option(cmd, option))
|
||||
list = g_slist_remove(list, option);
|
||||
if (command_have_option(cmd, option))
|
||||
list = g_slist_remove(list, option);
|
||||
}
|
||||
}
|
||||
|
||||
if (list == NULL)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue