From e64138b70a47483f4f4ed2d7e10f37f06dd88ab9 Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Thu, 17 Aug 2006 23:08:41 +0000 Subject: Fixed bug with display of message 329 (channel creation date), now displayed after a /cycle --- src/irc/irc-recv.c | 9 ++++++++- weechat/src/irc/irc-recv.c | 9 ++++++++- 2 files changed, 16 insertions(+), 2 deletions(-) diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c index 3377502d5..3010ad5bf 100644 --- a/src/irc/irc-recv.c +++ b/src/irc/irc-recv.c @@ -456,7 +456,6 @@ irc_cmd_recv_join (t_irc_server *server, char *host, char *nick, char *arguments } gui_buffer_new (gui_current_window, server, ptr_channel, BUFFER_TYPE_STANDARD, 1); - ptr_channel->display_creation_date = 1; } pos = strchr (host, '!'); @@ -475,9 +474,17 @@ irc_cmd_recv_join (t_irc_server *server, char *host, char *nick, char *arguments GUI_COLOR(COLOR_WIN_CHAT_CHANNEL), arguments); } + + /* display channel creation date if joining new channel */ + if (!ptr_channel->nicks) + ptr_channel->display_creation_date = 1; + + /* add nick in channel */ ptr_nick = nick_new (server, ptr_channel, nick, 0, 0, 0, 0, 0); if (ptr_nick) ptr_nick->host = strdup ((pos) ? pos + 1 : host); + + /* redraw nicklist and status bar */ gui_nicklist_draw (ptr_channel->buffer, 1, 1); gui_status_draw (ptr_channel->buffer, 1); return 0; diff --git a/weechat/src/irc/irc-recv.c b/weechat/src/irc/irc-recv.c index 3377502d5..3010ad5bf 100644 --- a/weechat/src/irc/irc-recv.c +++ b/weechat/src/irc/irc-recv.c @@ -456,7 +456,6 @@ irc_cmd_recv_join (t_irc_server *server, char *host, char *nick, char *arguments } gui_buffer_new (gui_current_window, server, ptr_channel, BUFFER_TYPE_STANDARD, 1); - ptr_channel->display_creation_date = 1; } pos = strchr (host, '!'); @@ -475,9 +474,17 @@ irc_cmd_recv_join (t_irc_server *server, char *host, char *nick, char *arguments GUI_COLOR(COLOR_WIN_CHAT_CHANNEL), arguments); } + + /* display channel creation date if joining new channel */ + if (!ptr_channel->nicks) + ptr_channel->display_creation_date = 1; + + /* add nick in channel */ ptr_nick = nick_new (server, ptr_channel, nick, 0, 0, 0, 0, 0); if (ptr_nick) ptr_nick->host = strdup ((pos) ? pos + 1 : host); + + /* redraw nicklist and status bar */ gui_nicklist_draw (ptr_channel->buffer, 1, 1); gui_status_draw (ptr_channel->buffer, 1); return 0; -- cgit v1.2.3