diff options
author | Sebastien Helleu <flashcode@flashtux.org> | 2011-03-05 09:09:58 +0100 |
---|---|---|
committer | Sebastien Helleu <flashcode@flashtux.org> | 2011-03-05 09:09:58 +0100 |
commit | 80609e4f72b79cc6bdde1f589aedbd96c42d7fb6 (patch) | |
tree | aa87a9fae6494311a07ea3a2ae1092cbb3299387 /src/plugins | |
parent | 7351c709f874c439d3d5f27e9c6b38581800489c (diff) | |
download | weechat-80609e4f72b79cc6bdde1f589aedbd96c42d7fb6.zip |
Ignore IRC join if nick is not self nick and if channel buffer does not exist (bug #32667)
Diffstat (limited to 'src/plugins')
-rw-r--r-- | src/plugins/irc/irc-protocol.c | 10 |
1 files changed, 9 insertions, 1 deletions
diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 1ad558517..608cbff03 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -456,11 +456,20 @@ IRC_PROTOCOL_CALLBACK(join) IRC_PROTOCOL_MIN_ARGS(3); IRC_PROTOCOL_CHECK_HOST; + local_join = (strcmp (nick, server->nick) == 0); + pos_channel = (argv[2][0] == ':') ? argv[2] + 1 : argv[2]; ptr_channel = irc_channel_search (server, pos_channel); if (!ptr_channel) { + /* + * if someone else joins and channel is not opened, then just + * ignore it (we should receive our self join first) + */ + if (!local_join) + return WEECHAT_RC_OK; + ptr_channel = irc_channel_new (server, IRC_CHANNEL_TYPE_CHANNEL, pos_channel, 1, 1); if (!ptr_channel) @@ -487,7 +496,6 @@ IRC_PROTOCOL_CALLBACK(join) if (!ignored) { - local_join = (strcmp (nick, server->nick) == 0); ptr_nick_speaking = ((weechat_config_boolean (irc_config_look_smart_filter)) && (weechat_config_boolean (irc_config_look_smart_filter_join))) ? irc_channel_nick_speaking_time_search (ptr_channel, nick, 1) : NULL; |