Bugs: PATCH1.6: Fix for broken channel flag nodesynch

lordares lordares at shatow.net
Mon Jun 21 13:17:51 CST 2004


Complicated, try to follow me...
-nodesynch will kick Nicks on irc that set modes while they themselves are
not opped. It will then reverse any modes they they did.
This works, except, currently, this is applied to servers as well!

So, you can imagine the flood after a netsplit...

The split clients all come back, the server sets all the modes on them...
that is fine, but then any bans the server sets will be reversed.

This small check will prevent this and any other bugs from this.. as
nodesynch should NOT be applied to a server.


------
Bryan Drewery
-------------- next part --------------
Index: src/mod/irc.mod/mode.c
===================================================================
RCS file: /usr/local/cvsroot/eggdrop1.6/src/mod/irc.mod/mode.c,v
retrieving revision 1.76
diff -u -d -p -r1.76 mode.c
--- src/mod/irc.mod/mode.c	10 Jan 2004 08:41:38 -0000	1.76
+++ src/mod/irc.mod/mode.c	21 Jun 2004 19:13:42 -0000
@@ -971,8 +971,8 @@ static int gotmode(char *from, char *ori
           dprintf(DP_MODE, "KICK %s %s :%s\n", ch, nick, CHAN_FAKEMODE_KICK);
           m->flags |= SENTKICK;
           reversing = 1;
-        } else if (!chan_hasop(m) && !chan_hashalfop(m) &&
-                 !channel_nodesynch(chan)) {
+        } else if (!strchr(m->nick, '.') && 		/* don't apply to servers. */
+                   !chan_hasop(m) && !chan_hashalfop(m) && !channel_nodesynch(chan)) {
           putlog(LOG_MODES, ch, CHAN_DESYNCMODE, ch);
           dprintf(DP_MODE, "KICK %s %s :%s\n", ch, nick, CHAN_DESYNCMODE_KICK);
           m->flags |= SENTKICK;


More information about the Bugs mailing list