diff options
author | Sadie Powell <sadie@witchery.services> | 2021-01-16 04:48:16 +0000 |
---|---|---|
committer | Sadie Powell <sadie@witchery.services> | 2021-01-16 04:48:16 +0000 |
commit | 77a8864d58a496c8af7eddb329cc668781b5c373 (patch) | |
tree | 3f90da3cc6c7eb92adc407ab44a3a6261e5ee283 /src/coremods | |
parent | 8754618697e8c4cc1f3f14cec5db4132ae73e77b (diff) |
Fix not rejecting attempts to set snomasks with SAMODE/override.
Diffstat (limited to 'src/coremods')
-rw-r--r-- | src/coremods/core_user/umode_s.cpp | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/src/coremods/core_user/umode_s.cpp b/src/coremods/core_user/umode_s.cpp index 5994f97fb..7080b277f 100644 --- a/src/coremods/core_user/umode_s.cpp +++ b/src/coremods/core_user/umode_s.cpp @@ -104,6 +104,13 @@ std::string ModeUserServerNoticeMask::ProcessNoticeMasks(User* user, const std:: user->WriteNumeric(ERR_UNKNOWNSNOMASK, *i, "is an unknown snomask character"); continue; } + else if (!user->IsOper()) + { + user->WriteNumeric(ERR_NOPRIVILEGES, InspIRCd::Format("Permission Denied - Only operators may %sset snomask %c", + adding ? "" : "un", *i)); + continue; + + } else if (!user->HasSnomaskPermission(*i)) { user->WriteNumeric(ERR_NOPRIVILEGES, InspIRCd::Format("Permission Denied - Oper type %s does not have access to snomask %c", |