diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2012-11-02 15:28:48 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-11-02 15:28:48 +0100 |
commit | f7b53fe6aa07d69928fbb0dc9311e7904a8c7673 (patch) | |
tree | 9235009344c77aa7f47ce7ec7fbeb3cbffe1dd76 /src | |
parent | 7002c446225075673ea919cae46c72d431a1bbf2 (diff) | |
download | weechat-f7b53fe6aa07d69928fbb0dc9311e7904a8c7673.zip |
core: support many commands in /eval (separated by semicolons)
Diffstat (limited to 'src')
-rw-r--r-- | src/core/wee-command.c | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index c0fce2c86..5ab73624a 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -1450,8 +1450,8 @@ COMMAND_CALLBACK(debug) COMMAND_CALLBACK(eval) { - int print_only; - char *result, *ptr_args; + int print_only, i; + char *result, *ptr_args, **commands; /* make C compiler happy */ (void) buffer; @@ -1496,7 +1496,17 @@ COMMAND_CALLBACK(eval) else { if (result) - input_data (buffer, result); + { + commands = string_split_command (result, ';'); + if (commands) + { + for (i = 0; commands[i]; i++) + { + input_data (buffer, commands[i]); + } + string_free_split_command (commands); + } + } else { gui_chat_printf (NULL, |