Allow snomasks to be added via oper config block, even if the oper
doesn't have `ban` or `snomasks` and therefore can't add snomasks
on their own.
This commit is contained in:
Shivaram Lingamneni 2021-04-18 20:06:00 -04:00
parent 3cca1e2c39
commit fed002d11a
1 changed files with 1 additions and 1 deletions

View File

@ -86,7 +86,7 @@ func ApplyUserModeChanges(client *Client, changes modes.ModeChanges, force bool,
if len(addMasks) != 0 {
oper := client.Oper()
// #1176: require special operator privileges to subscribe to snomasks
if oper.HasRoleCapab("snomasks") || oper.HasRoleCapab("ban") {
if force || oper.HasRoleCapab("snomasks") || oper.HasRoleCapab("ban") {
success = true
client.server.snomasks.AddMasks(client, addMasks...)
}