summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-01-16 04:48:16 +0000
committerSadie Powell <sadie@witchery.services>2021-01-16 04:48:16 +0000
commit77a8864d58a496c8af7eddb329cc668781b5c373 (patch)
tree3f90da3cc6c7eb92adc407ab44a3a6261e5ee283
parent8754618697e8c4cc1f3f14cec5db4132ae73e77b (diff)
Fix not rejecting attempts to set snomasks with SAMODE/override.
-rw-r--r--src/coremods/core_user/umode_s.cpp7
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",