Fix helpserv whine when helpers leave the channel; fix ?devoiceall
authorMichael Poole <mdpoole@troilus.org>
Fri, 21 May 2004 12:38:39 +0000 (12:38 +0000)
committerMichael Poole <mdpoole@troilus.org>
Fri, 21 May 2004 12:38:39 +0000 (12:38 +0000)
Remove the parting modeNode before making callbacks, so callbacks
don't get confused and think the user is still in the channel.

In ?devoiceall, OpServ should only remove voice from users who have it.
git-archimport-id: srvx@srvx.net--2004-srvx/srvx--devo--1.3--patch-64

ChangeLog
src/hash.c
src/opserv.c

index 19df33798678ea28a4e085bf13772d54a4f66f35..52fbb715ab5f012c9bc27144116796085825fba1 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -2,6 +2,22 @@
 # arch-tag: automatic-ChangeLog--srvx@srvx.net--2004-srvx/srvx--devo--1.3
 #
 
+2004-05-21 12:38:39 GMT        Michael Poole <mdpoole@troilus.org>     patch-64
+
+    Summary:
+      Fix helpserv whine when helpers leave the channel; fix ?devoiceall
+    Revision:
+      srvx--devo--1.3--patch-64
+
+    Remove the parting modeNode before making callbacks, so callbacks
+    don't get confused and think the user is still in the channel.
+    
+    In ?devoiceall, OpServ should only remove voice from users who have it.
+
+    modified files:
+     ChangeLog src/hash.c src/opserv.c
+
+
 2004-05-17 09:44:35 GMT        adam <adam@gamesurge.net>       patch-63
 
     Summary:
index edd745421fca6e7cbd9fd2bf56a074943c1d9a15..21bfa5f1bccc35c5534255f3203e50bf8a535ea8 100644 (file)
@@ -543,12 +543,15 @@ DelChannelUser(struct userNode* user, struct chanNode* channel, const char *reas
     if (!mNode)
         return;
 
-    for (n=0; n<pf_used; n++)
-       pf_list[n](mNode, reason);
-
     /* remove modeNode from channel and user */
     modeList_remove(&channel->members, mNode);
     modeList_remove(&user->channels, mNode);
+
+    /* make callbacks */
+    for (n=0; n<pf_used; n++)
+       pf_list[n](mNode, reason);
+
+    /* free memory */
     free(mNode);
 
     if (!deleting && !channel->members.used && !channel->locks && !(channel->modes & MODE_REGISTERED))
index 367d49673ada24a2c51e29810f179a008bcccd02..a38d836f9762c0b418932c7fc25a4a0c3a94890e 100644 (file)
@@ -1245,7 +1245,7 @@ static MODCMD_FUNC(cmd_devoiceall)
     change = mod_chanmode_alloc(channel->members.used);
     for (ii = count = 0; ii < channel->members.used; ++ii) {
        struct modeNode *mn = channel->members.list[ii];
-       if (mn->modes & MODE_VOICE)
+       if (!(mn->modes & MODE_VOICE))
             continue;
         change->args[count].mode = MODE_REMOVE | MODE_VOICE;
         change->args[count++].member = mn;