From: splidge Date: Tue, 29 May 2007 17:21:41 +0000 (+0100) Subject: This fixes a bug where the VOICE command wouldn't believe you had the X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/commitdiff_plain/e70833ab528e074d6af14ea9187292bb183ba924 This fixes a bug where the VOICE command wouldn't believe you had the correct priviliges in the 2+ argument forms. To make things simpler, find rcup a bit earlier in proceedings since the voice check relies on it being set. --- diff --git a/chanserv/chanservprivs.c b/chanserv/chanservprivs.c index 3fd1958f..fbb1b739 100644 --- a/chanserv/chanservprivs.c +++ b/chanserv/chanservprivs.c @@ -62,6 +62,9 @@ chanindex *cs_checkaccess(nick *np, const char *chan, unsigned int flags, if (!quiet) chanservstdmessage(np, QM_UNKNOWNCHAN, cip->name->content); return NULL; } + + if (rcp && rup) + rcup=findreguseronchannel(rcp, rup); if (!priv || !cs_privcheck(priv,np)) { if ((flags & CA_VOICEPRIV) && @@ -77,8 +80,7 @@ chanindex *cs_checkaccess(nick *np, const char *chan, unsigned int flags, return NULL; } - if ((flags & CA_NEEDKNOWN) && (!(rcup=findreguseronchannel(rcp, rup)) || - !CUKnown(rcup))) { + if ((flags & CA_NEEDKNOWN) && (!rcup || !CUKnown(rcup))) { if (!quiet) chanservstdmessage(np, QM_NOACCESSONCHAN, cip->name->content, cmdname); return NULL; }