]> jfr.im git - irc/rqf/shadowircd.git/commitdiff
Allow kick_on_split_riding to protect channels with mlocked keys.
authorJilles Tjoelker <redacted>
Wed, 6 Apr 2011 17:05:08 +0000 (19:05 +0200)
committerJilles Tjoelker <redacted>
Wed, 6 Apr 2011 17:05:08 +0000 (19:05 +0200)
Do kick_on_split_riding if services sends an SJOIN
with a lower TS and a different key. This relies on
services restoring TS (changets option in atheme) and
services not immediately parting after receiving the
KICK, which is the case in recent atheme.

For invite-only channels, still only do
kick_on_split_riding in netbursts. Services is
assumed to handle this itself (atheme does).

modules/core/m_join.c

index 82d5d708f2a27120f778dda9c0d7712c03e656e5..61fdf1838caa3e4b36992c1b5ba60cb009b23787 100644 (file)
@@ -394,12 +394,15 @@ ms_sjoin(struct Client *client_p, struct Client *source_p, int parc, const char
        {
                /* If configured, kick people trying to join +i/+k
                 * channels by recreating them on split servers.
-                * Don't kick if the source has sent EOB (services
-                * deopping everyone by TS-1 SJOIN).
+                * If the source has sent EOB, assume this is some
+                * sort of hack by services. If cmode +i is set,
+                * services can send kicks if needed; if the key
+                * differs, services cannot kick in a race-free
+                * manner so do so here.
                 * -- jilles */
                if (ConfigChannel.kick_on_split_riding &&
-                               !HasSentEob(source_p) &&
-                               ((mode.mode & MODE_INVITEONLY) ||
+                               ((!HasSentEob(source_p) &&
+                               mode.mode & MODE_INVITEONLY) ||
                    (mode.key[0] != 0 && irccmp(mode.key, oldmode->key) != 0)))
                {
                        struct membership *msptr;