X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=a922543a38ced7ab71137d8c1ef145e6fabcb35d;hb=acccaa39641500b8a691db4136e6571102a438ed;hp=15d9298b6503c1751ab0e47ed503e843e1808b4c;hpb=5a6fd54f8fd217232f98804431928609580742bc;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index 15d9298b6..a922543a3 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -69,17 +69,16 @@ bool ServerConfig::ApplyDisabledCommands(const std::string& data) std::string thiscmd; /* Enable everything first */ - for (Commandtable::iterator x = ServerInstance->Parser->cmdlist.begin(); x != ServerInstance->Parser->cmdlist.end(); x++) + const CommandParser::CommandMap& commands = ServerInstance->Parser.GetCommands(); + for (CommandParser::CommandMap::const_iterator x = commands.begin(); x != commands.end(); ++x) x->second->Disable(false); /* 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; } @@ -784,6 +783,9 @@ void ConfigReaderThread::Finish() for (ModuleManager::ModuleMap::const_iterator i = mods.begin(); i != mods.end(); ++i) i->second->ReadConfig(status); + // The description of this server may have changed - update it for WHOIS etc. + ServerInstance->FakeClient->server->description = Config->ServerDesc; + ServerInstance->ISupport.Build(); ServerInstance->Logs->CloseLogs();