]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Fix not rejecting attempts to set snomasks with SAMODE/override.
authorSadie Powell <sadie@witchery.services>
Sat, 16 Jan 2021 04:48:16 +0000 (04:48 +0000)
committerSadie Powell <sadie@witchery.services>
Sat, 16 Jan 2021 04:48:16 +0000 (04:48 +0000)
src/coremods/core_user/umode_s.cpp

index 5994f97fb753a557bb4a1c9188be74e71ed05858..7080b277fa5ae0e56f2a2f6651179a6051b5047e 100644 (file)
@@ -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",