From a0f814e75b7f0a582600bc1f56e664689225670b Mon Sep 17 00:00:00 2001 From: Sebastien Helleu Date: Sat, 11 May 2013 18:26:18 +0200 Subject: [PATCH] irc: remove tag "notify_private" from notices received before message 001 This removes tag "notify_private" from notices like that (sent before message 001): :irc.network.com NOTICE nick :*** Spoofing your IP :irc.network.com NOTICE nick :*** You are exempt from K/G/X lines :irc.network.com NOTICE nick :*** You are exempt from user limits --- src/plugins/irc/irc-protocol.c | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/plugins/irc/irc-protocol.c b/src/plugins/irc/irc-protocol.c index 917f57a5e..00c1f6448 100644 --- a/src/plugins/irc/irc-protocol.c +++ b/src/plugins/irc/irc-protocol.c @@ -1135,11 +1135,19 @@ IRC_PROTOCOL_CALLBACK(notice) { /* notice for user */ notify_private = 0; - if (nick + if (server->is_connected + && nick && (weechat_strcasecmp (nick, "nickserv") != 0) && (weechat_strcasecmp (nick, "chanserv") != 0) && (weechat_strcasecmp (nick, "memoserv") != 0)) { + /* + * add tag "notify_private" only if: + * - server is connected (message 001 already received) + * and: + * - notice is from a non-empty nick different from + * nickserv/chanserv/memoserv + */ notify_private = 1; }