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:
Jean Chevronnet 2026-08-29 13:11:08 +00:00
parent bbe2682478
commit 5dfedb5091
No known key found for this signature in database
GPG key ID: 439666D63A9477E4
11 changed files with 76 additions and 21 deletions

View file

@ -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