diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2007-06-11 06:46:53 +0000 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2007-06-11 06:46:53 +0000 |
commit | b80c53e87d804d46dc2dd7f0dfe7b308dbabc250 (patch) | |
tree | bd1cd002fcc2e596ed0bb47582ffa7fd7f33cd61 /src/irc/irc-recv.c | |
parent | 299d37a342cfd277bc48af546a5c20087a665415 (diff) | |
download | weechat-b80c53e87d804d46dc2dd7f0dfe7b308dbabc250.zip |
Fixed bug with /topic when channel not open and topic not defined (bug #20141)
Diffstat (limited to 'src/irc/irc-recv.c')
-rw-r--r-- | src/irc/irc-recv.c | 28 |
1 files changed, 11 insertions, 17 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index aaa26e6a1..6602c10ab 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -3666,24 +3666,18 @@ irc_recv_cmd_331 (t_irc_server *server, char *host, char *nick, char *arguments) } ptr_channel = irc_channel_search (server, pos_channel); - if (ptr_channel) - { - command_ignored |= irc_ignore_check (host, "331", ptr_channel->name, server->name); - if (!command_ignored) - { - irc_display_prefix (server, ptr_channel->buffer, PREFIX_INFO); - gui_printf (ptr_channel->buffer, _("No topic set for %s%s\n"), - GUI_COLOR(COLOR_WIN_CHAT_CHANNEL), - pos_channel); - } - } - else + command_ignored |= irc_ignore_check (host, "331", + (ptr_channel) ? ptr_channel->name : NULL, + server->name); + if (!command_ignored) { - irc_display_prefix (server, server->buffer, PREFIX_ERROR); - gui_printf_nolog (server->buffer, - _("%s channel \"%s\" not found for \"%s\" command\n"), - WEECHAT_ERROR, pos_channel, "331"); - return -1; + irc_display_prefix (server, + (ptr_channel) ? ptr_channel->buffer : NULL, + PREFIX_INFO); + gui_printf ((ptr_channel) ? ptr_channel->buffer : NULL, + _("No topic set for %s%s\n"), + GUI_COLOR(COLOR_WIN_CHAT_CHANNEL), + pos_channel); } } return 0; |