1
0
mirror of https://github.com/weechat/weechat.git synced 2026-07-05 01:03:14 +02:00

Added keep_eol flag to string_explode(), updated hook command callback arguments

This commit is contained in:
Sebastien Helleu
2007-11-05 13:29:54 +01:00
parent a98feff2bb
commit a97e2955be
10 changed files with 82 additions and 47 deletions
+13 -13
View File
@@ -73,6 +73,17 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
pos[1] = '\0';
}
rc = -1;
if (!only_builtin)
{
rc = hook_command_exec (buffer->plugin, command);
/*vars_replaced = alias_replace_vars (window, ptr_args);
rc = plugin_cmd_handler_exec (window->buffer->protocol, command + 1,
(vars_replaced) ? vars_replaced : ptr_args);
if (vars_replaced)
free (vars_replaced);*/
}
pos = strchr (command, ' ');
if (pos)
{
@@ -84,17 +95,6 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
if (!ptr_args[0])
ptr_args = NULL;
}
rc = -1;
if (!only_builtin)
{
rc = hook_command_exec (buffer->plugin, command + 1, ptr_args);
/*vars_replaced = alias_replace_vars (window, ptr_args);
rc = plugin_cmd_handler_exec (window->buffer->protocol, command + 1,
(vars_replaced) ? vars_replaced : ptr_args);
if (vars_replaced)
free (vars_replaced);*/
}
switch (rc)
{
@@ -107,7 +107,7 @@ input_exec_command (struct t_gui_buffer *buffer, char *string,
case 1: /* plugin handler OK, executed */
break;
default: /* plugin handler not found */
argv = string_explode (ptr_args, " ", 0, &argc);
argv = string_explode (ptr_args, " ", 0, 0, &argc);
/* look for alias */
if (!only_builtin)
@@ -380,7 +380,7 @@ input_data (struct t_gui_buffer *buffer, char *data, int only_builtin)
if ((ptr_data[0] == '/') && (ptr_data[1] == '/'))
ptr_data++;
hook_command_exec (buffer->plugin, "", ptr_data);
hook_command_exec (buffer->plugin, ptr_data);
if (buffer->input_data_cb)
{