From f7b53fe6aa07d69928fbb0dc9311e7904a8c7673 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Fri, 2 Nov 2012 15:28:48 +0100 Subject: [PATCH] core: support many commands in /eval (separated by semicolons) --- src/core/wee-command.c | 16 +++++++++++++--- 1 file 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,