summaryrefslogtreecommitdiff
path: root/src/irc/irc-recv.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/irc/irc-recv.c')
-rw-r--r--src/irc/irc-recv.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/irc/irc-recv.c b/src/irc/irc-recv.c
index 41e6cc04f..f84e9286f 100644
--- a/src/irc/irc-recv.c
+++ b/src/irc/irc-recv.c
@@ -2052,7 +2052,14 @@ irc_cmd_recv_004 (t_irc_server *server, char *host, char *arguments)
ptr_channel = ptr_channel->next_channel)
{
if (ptr_channel->type == CHAT_CHANNEL)
- server_sendf (server, "JOIN %s\r\n", ptr_channel->name);
+ {
+ if (ptr_channel->key)
+ server_sendf (server, "JOIN %s %s\r\n",
+ ptr_channel->name, ptr_channel->key);
+ else
+ server_sendf (server, "JOIN %s\r\n",
+ ptr_channel->name);
+ }
}
server->reconnect_join = 0;
}