]> jfr.im git - irc/quakenet/newserv.git/commitdiff
This fixes a bug where the VOICE command wouldn't believe you had the
authorsplidge <redacted>
Tue, 29 May 2007 17:21:41 +0000 (18:21 +0100)
committersplidge <redacted>
Tue, 29 May 2007 17:21:41 +0000 (18:21 +0100)
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.

chanserv/chanservprivs.c

index 3fd1958f0deba266c43543ee71c5b954f955f8f6..fbb1b73947b710bde983ec6f79a0efdc779633b1 100644 (file)
@@ -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;
     }