summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/irc/irc-recv.c9
-rw-r--r--weechat/src/irc/irc-recv.c9
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;