3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-25 21:39:25 +01:00
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

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...)
}