diff options
author | Peter Boström <pbos@kth.se> | 2012-09-18 18:08:21 +0200 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2012-09-18 18:08:21 +0200 |
commit | a80635c8b2329bc2cdc5192c2e2be61d43a320d6 (patch) | |
tree | 0ccda663b62b521fd7ed47a8eeaa2d9fb26f8313 /src/plugins/irc/irc-channel.c | |
parent | b5f7c124ea73d480b76ee3e339237c12a0ebcaf4 (diff) | |
download | weechat-a80635c8b2329bc2cdc5192c2e2be61d43a320d6.zip |
irc: fix rejoin of channels with a key, ignore value "*" sent by server for key (bug #24131)
Diffstat (limited to 'src/plugins/irc/irc-channel.c')
-rw-r--r-- | src/plugins/irc/irc-channel.c | 11 |
1 files changed, 10 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-channel.c b/src/plugins/irc/irc-channel.c index 638b92ac7..2fcf4bae6 100644 --- a/src/plugins/irc/irc-channel.c +++ b/src/plugins/irc/irc-channel.c @@ -265,7 +265,16 @@ irc_channel_new (struct t_irc_server *server, int channel_type, new_channel->topic = NULL; new_channel->modes = NULL; new_channel->limit = 0; - new_channel->key = NULL; + if (weechat_hashtable_has_key (server->channel_join_key, channel_name)) + { + new_channel->key = strdup (weechat_hashtable_get (server->channel_join_key, + channel_name)); + weechat_hashtable_remove (server->channel_join_key, channel_name); + } + else + { + new_channel->key = NULL; + } new_channel->names_received = 0; new_channel->checking_away = 0; new_channel->away_message = NULL; |