diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2010-10-15 16:06:17 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2010-10-15 16:06:17 +0200 |
commit | 79c8c90256f184be8c1a7313e946cd64c2a8e065 (patch) | |
tree | f42980eda3ddb3b1496dd7fa0a50622491404cbb /src/core/wee-command.c | |
parent | 3412b71959977ca65b29e43eb741e652f5292e3e (diff) | |
download | weechat-79c8c90256f184be8c1a7313e946cd64c2a8e065.zip |
Fix bug with buffer name in "/bar scroll" command
Diffstat (limited to 'src/core/wee-command.c')
-rw-r--r-- | src/core/wee-command.c | 17 |
1 files changed, 3 insertions, 14 deletions
diff --git a/src/core/wee-command.c b/src/core/wee-command.c index b46217f14..a973e897b 100644 --- a/src/core/wee-command.c +++ b/src/core/wee-command.c @@ -468,7 +468,7 @@ command_bar (void *data, struct t_gui_buffer *buffer, if (strcmp (argv[3], "*") == 0) ptr_buffer = buffer; else - ptr_buffer = gui_buffer_search_by_name (NULL, argv[3]); + ptr_buffer = gui_buffer_search_by_full_name (argv[3]); if (!ptr_buffer) { gui_chat_printf (NULL, @@ -2565,7 +2565,7 @@ command_mute (void *data, struct t_gui_buffer *buffer, int argc, char **argv, char **argv_eol) { int length, mute_mode; - char *command, *ptr_command, *buffer_name, *pos; + char *command, *ptr_command; struct t_gui_buffer *mute_buffer, *ptr_buffer; /* make C compiler happy */ @@ -2584,20 +2584,9 @@ command_mute (void *data, struct t_gui_buffer *buffer, } else if (string_strcasecmp (argv[1], "-buffer") == 0) { - ptr_buffer = NULL; if (argc < 3) return WEECHAT_RC_ERROR; - buffer_name = strdup (argv[2]); - if (!buffer_name) - return WEECHAT_RC_ERROR; - pos = strchr (buffer_name, '.'); - if (pos) - { - pos[0] = '\0'; - pos++; - ptr_buffer = gui_buffer_search_by_name (buffer_name, pos); - } - free (buffer_name); + ptr_buffer = gui_buffer_search_by_full_name (argv[2]); if (ptr_buffer) mute_buffer = ptr_buffer; ptr_command = argv_eol[3]; |