chm_staff: use oper:cmodes, don't check op status

This commit is contained in:
Ed Kellett 2019-07-07 16:51:03 +01:00
parent d4f7eb4ce6
commit 80303ab70e
No known key found for this signature in database
GPG key ID: CB9986DEF342FABC
3 changed files with 6 additions and 8 deletions

View file

@ -247,7 +247,7 @@ privset "server_bot" {
privset "global_op" { privset "global_op" {
extends = "local_op"; extends = "local_op";
privs = oper:global_kill, oper:routing, oper:kline, oper:unkline, oper:xline, privs = oper:global_kill, oper:routing, oper:kline, oper:unkline, oper:xline,
oper:resv, oper:mass_notice, oper:remoteban; oper:resv, oper:cmodes, oper:mass_notice, oper:remoteban;
}; };
privset "admin" { privset "admin" {

View file

@ -447,7 +447,8 @@ privset "local_op" {
* will not have the admin lines in * will not have the admin lines in
* whois. * whois.
* oper:xline: allows use of /quote xline/unxline * oper:xline: allows use of /quote xline/unxline
* oper:resv: allows /quote resv/unresv and cmode +LP * oper:resv: allows /quote resv/unresv
* oper:cmodes allows cmode +LP
* oper:operwall: allows the oper to send/receive operwalls * oper:operwall: allows the oper to send/receive operwalls
* oper:spy: allows 'operspy' features to see through +s * oper:spy: allows 'operspy' features to see through +s
* channels etc. see /quote help operspy * channels etc. see /quote help operspy
@ -468,7 +469,7 @@ privset "server_bot" {
privset "global_op" { privset "global_op" {
extends = "local_op"; extends = "local_op";
privs = oper:global_kill, oper:routing, oper:kline, oper:unkline, oper:xline, privs = oper:global_kill, oper:routing, oper:kline, oper:unkline, oper:xline,
oper:resv, oper:mass_notice, oper:remoteban; oper:resv, oper:cmodes, oper:mass_notice, oper:remoteban;
}; };
privset "admin" { privset "admin" {

View file

@ -714,18 +714,15 @@ chm_staff(struct Client *source_p, struct Channel *chptr,
*errors |= SM_ERR_NOPRIVS; *errors |= SM_ERR_NOPRIVS;
return; return;
} }
if(MyClient(source_p) && !IsOperResv(source_p)) if(MyClient(source_p) && !HasPrivilege(source_p, "oper:cmodes"))
{ {
if(!(*errors & SM_ERR_NOPRIVS)) if(!(*errors & SM_ERR_NOPRIVS))
sendto_one(source_p, form_str(ERR_NOPRIVS), me.name, sendto_one(source_p, form_str(ERR_NOPRIVS), me.name,
source_p->name, "resv"); source_p->name, "cmodes");
*errors |= SM_ERR_NOPRIVS; *errors |= SM_ERR_NOPRIVS;
return; return;
} }
if(!allow_mode_change(source_p, chptr, CHFL_CHANOP, errors, c))
return;
if(MyClient(source_p) && (++mode_limit_simple > MAXMODES_SIMPLE)) if(MyClient(source_p) && (++mode_limit_simple > MAXMODES_SIMPLE))
return; return;