From: Michael Poole Date: Fri, 21 May 2004 12:38:39 +0000 (+0000) Subject: Fix helpserv whine when helpers leave the channel; fix ?devoiceall X-Git-Tag: v1.4.0-rc1~212 X-Git-Url: http://git.pk910.de/?p=srvx.git;a=commitdiff_plain;h=dd563e131da6ad405cb978e0c660759baf2c5937 Fix helpserv whine when helpers leave the channel; fix ?devoiceall 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 --- diff --git a/ChangeLog b/ChangeLog index 19df337..52fbb71 100644 --- 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 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 patch-63 Summary: diff --git a/src/hash.c b/src/hash.c index edd7454..21bfa5f 100644 --- a/src/hash.c +++ b/src/hash.c @@ -543,12 +543,15 @@ DelChannelUser(struct userNode* user, struct chanNode* channel, const char *reas if (!mNode) return; - for (n=0; nmembers, mNode); modeList_remove(&user->channels, mNode); + + /* make callbacks */ + for (n=0; nmembers.used && !channel->locks && !(channel->modes & MODE_REGISTERED)) diff --git a/src/opserv.c b/src/opserv.c index 367d496..a38d836 100644 --- a/src/opserv.c +++ b/src/opserv.c @@ -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;