From 77a8864d58a496c8af7eddb329cc668781b5c373 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 16 Jan 2021 04:48:16 +0000 Subject: Fix not rejecting attempts to set snomasks with SAMODE/override. --- src/coremods/core_user/umode_s.cpp | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'src/coremods') 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", -- cgit v1.2.3