[IRCServices] Kick war with ChanServ, for the 135175631861th time..

Andrew Church achurch at achurch.org
Sun Jan 6 08:52:34 PST 2008


>I understand it must be frustrating to have an issue like this that's
>so hard to track down, but it is equally frustrating to get bit in the
>ass by it. Isn't it wise to assume that if they are joining an
>existing channel that a ban matching them doesn't exist anyway
>(otherwise how are they joining?)

+e, +I, explicit INVITE, possibly other methods.  Originally, I didn't
bother checking for the ban, but apparently it caused a problem, because
I added the check in 4.5pre0:

2001/01/11      Fixed duplicate adding of bans when auto-kicking a user
                    from a channel.  Reported by James <daemus at evilcode.com>
--- chanserv.c  11 Jan 2001 00:03:56 -0000      1.10
+++ chanserv.c  11 Jan 2001 04:29:13 -0000      1.11
@@ -670,10 +670,13 @@
 #else
     }
 #endif
-    av[1] = "+b";
-    av[2] = mask;
-    send_cmd(s_ChanServ, "MODE %s +b %s %lu", chan, mask, time(NULL));
-    do_cmode(s_ChanServ, 3, av);
+    /* Apparently invites can get around bans, so check for ban first */
+    if (!chan_has_ban(mask)) {
+       av[1] = "+b";
+       av[2] = mask;
+       send_cmd(s_ChanServ, "MODE %s +b %s %lu", chan, mask, time(NULL));
+       do_cmode(s_ChanServ, 3, av);
+    }
     free(mask);
     send_cmd(s_ChanServ, "KICK %s %s :%s", chan, user->nick, reason);
     if (stay) {

The list archives are down at the moment, so I can't check exactly what
the problem was, whether it was a serious issue or just cosmetic; I'm
hesitant to remove the check without knowing more.  (Of course, you're
welcome to try removing it yourself and seeing what happens.)

  --Andrew Church
    achurch at achurch.org
    http://achurch.org/