mirror of
https://github.com/weechat/weechat.git
synced 2026-07-07 10:13:12 +02:00
Fixed bug with alias, use current buffer to run commands (bug #22876)
This commit is contained in:
@@ -1,10 +1,11 @@
|
||||
WeeChat - Wee Enhanced Environment for Chat
|
||||
===========================================
|
||||
|
||||
ChangeLog - 2008-04-11
|
||||
ChangeLog - 2008-04-15
|
||||
|
||||
|
||||
Version 0.2.7 (under dev!):
|
||||
* fixed bug with alias, use current buffer to run commands (bug #22876)
|
||||
* new names for config files (*.conf instead of *.rc)
|
||||
* improved /set command, new command /unset
|
||||
* added new type of buffer, with free content
|
||||
|
||||
@@ -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);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user