X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_disable.cpp;h=95fcd8b4cb1fe49c90f8905b9fc68dbe2409efef;hb=e2b0f3dc9ef4d56c71d7abda13e6139ca092e387;hp=d8a048e3e8c22ab411ea4799e93c7eb3d93f9a8b;hpb=44489ddf7e90413d8f656aea24d74445bab227af;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_disable.cpp b/src/modules/m_disable.cpp index d8a048e3e..95fcd8b4c 100644 --- a/src/modules/m_disable.cpp +++ b/src/modules/m_disable.cpp @@ -55,7 +55,7 @@ class ModuleDisable : public Module // Check that the mode actually exists. ModeHandler* mh = ServerInstance->Modes->FindMode(chr, type); - if (!chr) + if (!mh) throw ModuleException(InspIRCd::Format("Nonexistent mode '%c' was specified in at %s", chr, field.c_str(), tag->getTagLocation().c_str())); @@ -93,8 +93,8 @@ class ModuleDisable : public Module throw ModuleException(InspIRCd::Format("Nonexistent command '%s' was specified in at %s", command.c_str(), tag->getTagLocation().c_str())); - // Prevent admins from disabling COMMANDS and MODULES for transparency reasons. - if (handler->name == "COMMANDS" || handler->name == "MODULES") + // Prevent admins from disabling MODULES for transparency reasons. + if (handler->name == "MODULES") continue; // Disable the command.