summaryrefslogtreecommitdiff
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorAttila Molnar <attilamolnar@hush.com>2014-06-13 15:33:10 +0200
committerAttila Molnar <attilamolnar@hush.com>2014-06-13 15:33:10 +0200
commit7f878af39e659176677913890e143a247add7bdc (patch)
treec75b49c0b13a9f237ad906a6bc1603b6750282c8 /src/configreader.cpp
parent467b276d9d0407ec412262525c43c28d47fdae2f (diff)
Use CommandParser::GetHandler() in ServerConfig::ApplyDisabledCommands()
Diffstat (limited to 'src/configreader.cpp')
-rw-r--r--src/configreader.cpp8
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;
}