case QPRIV_VIEWAUTOLIMIT:
case QPRIV_VIEWBANTIMER:
case QPRIV_VIEWUSERFLAGS:
+ case QPRIV_VIEWCHANSUSPENSION:
return (rup && UHasHelperPriv(rup));
case QPRIV_VIEWCOMMENTS:
case QPRIV_CHANGEAUTOLIMIT:
case QPRIV_CHANGEBANTIMER:
case QPRIV_CHANGEUSERFLAGS:
+ case QPRIV_VIEWSUSPENDEDBY:
+ case QPRIV_VIEWWALLMESSAGE: /* if you change VIEWWALLMESSAGE alter chanservwallmessage too */
+ case QPRIV_VIEWREALHOST:
return (np && rup && IsOper(np) && UHasOperPriv(rup));
- default:
- return 0;
+ default: /* By default opers can override anything */
+ return (np && rup && IsOper(np) && UHasOperPriv(rup));
}
}
return NULL;
}
- if (!(rcp=cip->exts[chanservext]) ||
- (CIsSuspended(rcp) && !cs_privcheck(QPRIV_SUSPENDBYPASS, np))) {
+ if (!(rcp=cip->exts[chanservext])) {
if (!quiet) chanservstdmessage(np, QM_UNKNOWNCHAN, cip->name->content);
return NULL;
}
+
+
+ if (CIsSuspended(rcp)) {
+ if (cs_privcheck(QPRIV_SUSPENDBYPASS, np)) {
+ if (!quiet) chanservstdmessage(np, QM_BYPASSINGSUSPEND, cip->name->content);
+ } else {
+ 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 (!cs_privcheck(priv,np)) {
if ((flags & CA_VOICEPRIV) &&
- !(rcp && (CIsVoiceAll(rcp)) &&
- !(cip->channel && (nickbanned(np, cip->channel) || IsInviteOnly(cip->channel)))) &&
- !(rcup && (CUHasVoicePriv(rcup)))) {
+ !(rcp && CIsVoiceAll(rcp) && !(rcup && CUIsQuiet(rcup)) &&
+ !(cip->channel && (nickbanned(np, cip->channel, 1) || IsInviteOnly(cip->channel)))) &&
+ !(rcup && CUHasVoicePriv(rcup))) {
if (!quiet) chanservstdmessage(np, QM_NOACCESSONCHAN, cip->name->content, cmdname);
return NULL;
}