diff options
-rw-r--r-- | ChangeLog | 6 | ||||
-rw-r--r-- | src/irc/irc-recv.c | 28 | ||||
-rw-r--r-- | weechat/ChangeLog | 6 | ||||
-rw-r--r-- | weechat/src/irc/irc-recv.c | 28 |
4 files changed, 30 insertions, 38 deletions
@@ -1,10 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2007-06-08 +ChangeLog - 2007-06-11 -Version 0.2.5 (under dev!): +Version 0.2.6 (under dev!): + * fixed bug with /topic when channel not open and topic not defined + (bug #20141) * added hotlist sort with new option "look_hotlist_sort" (task #5870) Version 0.2.5 (2007-06-07): 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; diff --git a/weechat/ChangeLog b/weechat/ChangeLog index 77f622bfb..34dc37db5 100644 --- a/weechat/ChangeLog +++ b/weechat/ChangeLog @@ -1,10 +1,12 @@ WeeChat - Wee Enhanced Environment for Chat =========================================== -ChangeLog - 2007-06-08 +ChangeLog - 2007-06-11 -Version 0.2.5 (under dev!): +Version 0.2.6 (under dev!): + * fixed bug with /topic when channel not open and topic not defined + (bug #20141) * added hotlist sort with new option "look_hotlist_sort" (task #5870) Version 0.2.5 (2007-06-07): diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c index aaa26e6a1..6602c10ab 100644 --- a/weechat/src/irc/irc-recv.c +++ b/weechat/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; |