]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Show spambot notices for joins, not for parts.
authorJilles Tjoelker <redacted>
Sat, 8 Nov 2008 16:22:41 +0000 (17:22 +0100)
committerJilles Tjoelker <redacted>
Sat, 8 Nov 2008 16:22:41 +0000 (17:22 +0100)
Parts still decrement the counter for showing notices.
This shows more channels in the notices.

src/channel.c

index 52e4b50dee08bcd0d900ba62b6ddef7db70c36fd..80bf5c5c2f5573d87e9055ace7f1f46a9396688d 100644 (file)
@@ -918,19 +918,14 @@ check_spambot_warning(struct Client *source_p, const char *name)
                        source_p->localClient->oper_warn_count_down--;
                else
                        source_p->localClient->oper_warn_count_down = 0;
-               if(source_p->localClient->oper_warn_count_down == 0)
+               if(source_p->localClient->oper_warn_count_down == 0 &&
+                               name != NULL)
                {
                        /* Its already known as a possible spambot */
-                       if(name != NULL)
-                               sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
-                                                    "User %s (%s@%s) trying to join %s is a possible spambot",
-                                                    source_p->name,
-                                                    source_p->username, source_p->orighost, name);
-                       else
-                               sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
-                                                    "User %s (%s@%s) is a possible spambot",
-                                                    source_p->name,
-                                                    source_p->username, source_p->orighost);
+                       sendto_realops_snomask(SNO_BOTS, L_NETWIDE,
+                                            "User %s (%s@%s) trying to join %s is a possible spambot",
+                                            source_p->name,
+                                            source_p->username, source_p->orighost, name);
                        source_p->localClient->oper_warn_count_down = OPER_SPAM_COUNTDOWN;
                }
        }