diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-15 13:56:20 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2008-04-15 13:56:20 +0200 |
commit | 26f55917322c5177efc20c9763ef47fa8e2505ee (patch) | |
tree | 45a16c2ee2603bb482d3c7b7efdd2c455f905a53 /src | |
parent | b87d709a7079e5c20b2d556158f57239c72095b7 (diff) | |
download | weechat-26f55917322c5177efc20c9763ef47fa8e2505ee.zip |
Fixed bug with alias, use current buffer to run commands (bug #22876)
Diffstat (limited to 'src')
-rw-r--r-- | src/plugins/alias/alias.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/src/plugins/alias/alias.c b/src/plugins/alias/alias.c index f035171c6..e8f226d94 100644 --- a/src/plugins/alias/alias.c +++ b/src/plugins/alias/alias.c @@ -187,6 +187,7 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, int some_args_replaced, length1, length2; /* make C compiler happy */ + (void) buffer; (void) argc; (void) argv; @@ -220,7 +221,7 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, { some_args_replaced = 1; if (*ptr_cmd[0] == '/') - weechat_command (buffer, args_replaced); + weechat_command (weechat_current_buffer, args_replaced); else { alias_command = malloc (1 + strlen(args_replaced) + 1); @@ -228,7 +229,7 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, { strcpy (alias_command, "/"); strcat (alias_command, args_replaced); - weechat_command (buffer, alias_command); + weechat_command (weechat_current_buffer, alias_command); free (alias_command); } } @@ -255,14 +256,16 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, strcat (alias_command, " "); strcat (alias_command, argv_eol[1]); - weechat_command (buffer, alias_command); + weechat_command (weechat_current_buffer, + alias_command); free (alias_command); } } else { if (*ptr_cmd[0] == '/') - (void) weechat_command(buffer, *ptr_cmd); + (void) weechat_command(weechat_current_buffer, + *ptr_cmd); else { alias_command = malloc (1 + strlen (*ptr_cmd) + 1); @@ -270,7 +273,8 @@ alias_cb (void *data, struct t_gui_buffer *buffer, int argc, char **argv, { strcpy (alias_command, "/"); strcat (alias_command, *ptr_cmd); - weechat_command (buffer, alias_command); + weechat_command (weechat_current_buffer, + alias_command); free (alias_command); } } |