aboutsummaryrefslogtreecommitdiffstats
path: root/src/configreader.cpp
diff options
context:
space:
mode:
authorGravatar Attila Molnar2014-06-13 15:33:10 +0200
committerGravatar Attila Molnar2014-06-13 15:33:10 +0200
commit7f878af39e659176677913890e143a247add7bdc (patch)
treec75b49c0b13a9f237ad906a6bc1603b6750282c8 /src/configreader.cpp
parentChange allocation of InspIRCd::BanCache to be physically part of the object c... (diff)
downloadinspircd++-7f878af39e659176677913890e143a247add7bdc.tar.gz
inspircd++-7f878af39e659176677913890e143a247add7bdc.tar.bz2
inspircd++-7f878af39e659176677913890e143a247add7bdc.zip
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;
}