diff options
-rw-r--r-- | src/configreader.cpp | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp index 15d9298b6..1ac075557 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -75,11 +75,9 @@ bool ServerConfig::ApplyDisabledCommands(const std::string& data) /* Now disable all the ones which the user wants disabled */ while (dcmds >> thiscmd) { - Commandtable::iterator cm = ServerInstance->Parser->cmdlist.find(thiscmd); - if (cm != ServerInstance->Parser->cmdlist.end()) - { - cm->second->Disable(true); - } + Command* handler = ServerInstance->Parser->GetHandler(thiscmd); + if (handler) + handler->Disable(true); } return true; } |