summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSebastien Helleu <flashcode@flashtux.org>2011-03-05 09:09:58 +0100
committerSebastien Helleu <flashcode@flashtux.org>2011-03-05 09:09:58 +0100
commit80609e4f72b79cc6bdde1f589aedbd96c42d7fb6 (patch)
treeaa87a9fae6494311a07ea3a2ae1092cbb3299387
parent7351c709f874c439d3d5f27e9c6b38581800489c (diff)
downloadweechat-80609e4f72b79cc6bdde1f589aedbd96c42d7fb6.zip
Ignore IRC join if nick is not self nick and if channel buffer does not exist (bug #32667)
-rw-r--r--ChangeLog4
-rw-r--r--src/plugins/irc/irc-protocol.c10
2 files changed, 12 insertions, 2 deletions
diff --git a/ChangeLog b/ChangeLog
index 7d7c46cbe..125d28c52 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,7 +1,7 @@
WeeChat ChangeLog
=================
Sébastien Helleu <flashcode@flashtux.org>
-v0.3.5-dev, 2011-03-04
+v0.3.5-dev, 2011-03-05
Version 0.3.5 (under dev!)
@@ -28,6 +28,8 @@ Version 0.3.5 (under dev!)
* core: dynamically allocate color pairs (extended colors can be used without
being added with command "/color")
* core: allow background for nick colors (using ":")
+* irc: ignore join if nick is not self nick and if channel buffer does not exist
+ (bug #32667)
* irc: fix crash when setting wrong value in option
irc.server.xxx.sasl_mechanism (bug #32670)
* irc: add new options irc.look.color_nicks_in_nicklist and
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;