Staff can now whois &accountid where before only helpers could (queue workers aren't necessarily in .support).
/* Check for too many auths. Don't return immediately, since we will still warn
* other users on the acct in this case. */
- if (!UHasHelperPriv(rup) && !UIsNoAuthLimit(rup)) {
+ if (!UHasStaffPriv(rup) && !UIsNoAuthLimit(rup)) {
if (anp->usercount >= MAXAUTHCOUNT) {
chanservstdmessage(sender, QM_TOOMANYAUTHS);
toomanyauths=1;
return CMD_ERROR;
}
- if(!UHasHelperPriv(rup) && (rup->lockuntil && rup->lockuntil > t)) {
+ if(!UHasStaffPriv(rup) && (rup->lockuntil && rup->lockuntil > t)) {
chanservstdmessage(sender, QM_ACCOUNTLOCKED, rup->lockuntil);
return CMD_ERROR;
}
rup->email=getsstring(cargv[1],EMAILLEN);
rup->lastemailchange=t;
rup->domain=findorcreatemaildomain(rup->email->content);
- if(!UHasHelperPriv(rup)) {
+ if(!UHasStaffPriv(rup)) {
rup->lockuntil=t+7*24*3600;
} else {
rup->lockuntil=0;
if (!(rup=findreguser(sender, cargv[0])))
return CMD_ERROR;
- if(UHasHelperPriv(rup)) {
+ if(UHasStaffPriv(rup)) {
cs_log(sender,"GETPASSWORD FAILED username %s",rup->username);
chanservwallmessage("%s (%s) just FAILED using GETPASSWORD on %s", sender->nick, srup->username, rup->username);
chanservsendmessage(sender, "Sorry, that user is privileged.");
}
t=time(NULL);
- if(!UHasHelperPriv(rup)) {
+ if(!UHasStaffPriv(rup)) {
if(rup->lockuntil && rup->lockuntil > t) {
chanservstdmessage(sender, QM_ACCOUNTLOCKED, rup->lockuntil);
return CMD_ERROR;
if(!rup->email || strcasecmp(cargv[0],rup->email->content))
continue;
- if(UHasHelperPriv(rup)) {
+ if(UHasStaffPriv(rup)) {
cs_log(sender,"REQUESTPASSWORD FAIL privileged email %s",cargv[0]);
continue;
}
return CMD_ERROR;
t=time(NULL);
- if(UHasHelperPriv(rup) || (!rup->lockuntil || rup->lockuntil <= t)) {
+ if(UHasStaffPriv(rup) || (!rup->lockuntil || rup->lockuntil <= t)) {
chanservstdmessage(sender, QM_ACCOUNTNOTLOCKED);
return CMD_ERROR;
}
if (!(rup=findreguser(sender, cargv[0])))
return CMD_ERROR;
- if(UHasHelperPriv(rup)) {
+ if(UHasStaffPriv(rup)) {
chanservstdmessage(sender, QM_REQUESTPASSPRIVUSER);
cs_log(sender,"SENDPASSWORD FAIL privilidged user %s",rup->username);
return CMD_ERROR;
if (csa_checkeboy(sender, cargv[1]))
return CMD_ERROR;
- if(UHasHelperPriv(rup)) {
+ if(UHasStaffPriv(rup)) {
cs_log(sender,"SETEMAIL FAILED username %s",rup->username);
chanservwallmessage("%s (%s) just FAILED using SETEMAIL on %s: %s", sender->nick, vrup->username, rup->username, cargv[1]);
chanservsendmessage(sender, "Sorry, that user is privileged.");
if (!(rup=findreguser(sender, cargv[0])))
return CMD_ERROR;
- if(UHasHelperPriv(rup)) {
+ if(UHasStaffPriv(rup)) {
cs_log(sender,"GETPASSWORD FAILED username %s",rup->username);
chanservwallmessage("%s (%s) just FAILED using SETPASSWORD on %s", sender->nick, vrup->username, rup->username);
chanservsendmessage(sender, "Sorry, that user is privileged.");
summary=(cmdsummary *)cmdlist[i]->ext;
- if (rup && UHasHelperPriv(rup)) {
+ if (rup && UHasStaffPriv(rup)) {
if (cmdlist[i]->level & QCMD_DEV) {
sprintf(cmdbuf,"+d %s",cmdlist[i]->command->content);
} else if(cmdlist[i]->level & QCMD_ADMIN) {
rup=getreguserfromnick(sender);
/* Don't showhelp for privileged users to others.. */
- if (((cmd->level & QCMD_HELPER) && (!rup || !UHasHelperPriv(rup))) ||
+ if (((cmd->level & QCMD_STAFF) && (!rup || !UHasStaffPriv(rup))) ||
+ ((cmd->level & QCMD_HELPER) && (!rup || !UHasHelperPriv(rup))) ||
((cmd->level & QCMD_OPER) && (!rup || !UHasOperPriv(rup))) ||
((cmd->level & QCMD_ADMIN) && (!rup || !UHasAdminPriv(rup))) ||
((cmd->level & QCMD_DEV) && (!rup || !UIsDev(rup)))) {
}
if (!(rup=findreguserbynick(str+1)) && sender)
chanservstdmessage(sender, QM_UNKNOWNUSER, str);
- } else if (*str=='&' && vrup && UHasHelperPriv(vrup)) {
+ } else if (*str=='&' && vrup && UHasStaffPriv(vrup)) {
if (str[1]=='\0') {
if (sender)
chanservstdmessage(sender, QM_UNKNOWNUSER, str);
if (!(anp=findauthname(vrup->ID)))
continue; /* should maybe raise hell instead */
- if(!anp->nicks && !UHasHelperPriv(vrup) && !UIsCleanupExempt(vrup)) {
+ if(!anp->nicks && !UHasStaffPriv(vrup) && !UIsCleanupExempt(vrup)) {
if(vrup->lastauth && (vrup->lastauth < to_age)) {
expired++;
cs_log(sender, "CLEANUPDB inactive user %s %u", vrup->username, vrup->ID);
if (!(target=findreguser(sender, cargv[0])))
return CMD_ERROR;
- if(UHasHelperPriv(target)) {
+ if(UHasStaffPriv(target)) {
cs_log(sender,"DELUSER FAILED username %s (%s)",target->username,cargc>1?cargv[1]:"");
chanservwallmessage("%s (%s) just FAILED using DELUSER on %s (%s)", sender->nick, rup->username, target->username, cargv[1]);
chanservsendmessage(sender, "Sorry, that user is privileged.");
chanservstdmessage(sender, QM_SPEWHEADER);
for (i=0;i<REGUSERHASHSIZE;i++) {
for (dbrup=regusernicktable[i]; dbrup; dbrup=dbrup->nextbyname) {
- if (!UHasHelperPriv(dbrup) && !match(cargv[0], dbrup->password)) {
+ if (!UHasStaffPriv(dbrup) && !match(cargv[0], dbrup->password)) {
chanservsendmessage(sender, "%-15s %-10s %-30s %s", dbrup->username, UHasSuspension(dbrup)?"yes":"no", dbrup->email?dbrup->email->content:"none set", dbrup->lastuserhost?dbrup->lastuserhost->content:"none");
count++;
if (count >= 2000) {
if (UHasSuspension(vrup))
continue;
- if (UHasHelperPriv(vrup))
+ if (UHasStaffPriv(vrup))
continue;
hitcount++;
if (UHasSuspension(vrup))
continue;
- if (UHasHelperPriv(vrup))
+ if (UHasStaffPriv(vrup))
continue;
hitcount++;
return CMD_ERROR;
}
- if (UHasHelperPriv(vrup)) {
+ if (UHasStaffPriv(vrup)) {
snprintf(buf, 199, "suspenduser on %s", vrup->username);
chanservstdmessage(sender, QM_NOACCESS, buf);
chanservwallmessage("%s (%s) FAILED to suspend %s", sender->nick, rup->username, vrup->username);