opers: wire eight more privileges over their raw is_oper gates
Convert the remaining oper bypass/visibility gates to named privileges: channels/restricted-create, channels/ignore-nonicks, users/ignore-callerid, users/secret-whois, users/ignore-restrictmsg, servers/use-disabled-commands, servers/ignore-securelist, servers/ignore-blockamsg. The override class gains the channel/message/anti-spam bypasses, auspex gains secret-whois + ignore-callerid, server gains use-disabled-commands; netadmin keeps all via privs=*. Docs updated; verified restricted-create + ignore-nonicks live.
This commit is contained in:
parent
bbe2682478
commit
5dfedb5091
11 changed files with 76 additions and 21 deletions
|
|
@ -766,8 +766,10 @@ impl Server {
|
|||
if crate::modules::denychans::intercept(self, uid, name, is_oper) {
|
||||
return;
|
||||
}
|
||||
// restrictchans — only opers may create new channels (unless whitelisted)
|
||||
if crate::modules::restrictchans::intercept(self, uid, name, is_oper) {
|
||||
// restrictchans — channels/restricted-create may create new channels (unless whitelisted)
|
||||
let may_create =
|
||||
crate::modules::opertypes::has_priv(self, uid, crate::modules::opertypes::privs::CHANNELS_RESTRICTED_CREATE);
|
||||
if crate::modules::restrictchans::intercept(self, uid, name, may_create) {
|
||||
return;
|
||||
}
|
||||
// channames — forbidden characters in new channel names
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue