diff options
author | Attila Molnar <attilamolnar@hush.com> | 2014-06-13 15:33:10 +0200 |
---|---|---|
committer | Attila Molnar <attilamolnar@hush.com> | 2014-06-13 15:33:10 +0200 |
commit | 7f878af39e659176677913890e143a247add7bdc (patch) | |
tree | c75b49c0b13a9f237ad906a6bc1603b6750282c8 | |
parent | 467b276d9d0407ec412262525c43c28d47fdae2f (diff) |
Use CommandParser::GetHandler() in ServerConfig::ApplyDisabledCommands()
-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; } |