X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigreader.cpp;h=8d705f0cae6b46f99e59fc3fd85e78c7f3096185;hb=7892c8a0313c50d8138942ff3b112691caf05a2f;hp=a6d6e3c85e256d8f211ce3b1bdf210655c4313e1;hpb=6cfd6ad816d597a88abcbe6c6dc9d3e507aa539c;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configreader.cpp b/src/configreader.cpp index a6d6e3c85..8d705f0ca 100644 --- a/src/configreader.cpp +++ b/src/configreader.cpp @@ -442,11 +442,10 @@ static bool ValidateWhoWas(ServerConfig* conf, const char*, const char*, ValueIt conf->GetInstance()->Logs->Log("CONFIG",DEFAULT,"WARNING: value less than 3600, setting to default 3600"); } - Command* whowas_command = conf->GetInstance()->Parser->GetHandler("WHOWAS"); - if (whowas_command) + Module* whowas = conf->GetInstance()->Modules->Find("cmd_whowas.so"); + if (whowas) { - std::deque params; - whowas_command->HandleInternal(WHOWAS_PRUNE, params); + WhowasRequest(NULL, whowas, WhowasRequest::WHOWAS_PRUNE).Send(); } return true; @@ -558,10 +557,10 @@ static bool DoClass(ServerConfig* conf, const char* tag, const char**, ValueList } } - conf->operclass[ClassName].commandlist = strnewdup(CommandList); - conf->operclass[ClassName].umodelist = strnewdup(UModeList); - conf->operclass[ClassName].cmodelist = strnewdup(CModeList); - conf->operclass[ClassName].privs = strnewdup(PrivsList); + conf->operclass[ClassName].commandlist = CommandList; + conf->operclass[ClassName].umodelist = UModeList; + conf->operclass[ClassName].cmodelist = CModeList; + conf->operclass[ClassName].privs = PrivsList; return true; } @@ -706,8 +705,8 @@ void ServerConfig::CrossCheckConnectBlocks(ServerConfig* current) ClassMap::iterator oldMask = oldBlocksByMask.find(typeMask); if (oldMask != oldBlocksByMask.end()) { - oldBlocksByMask.erase(oldMask); ConnectClass* old = oldMask->second; + oldBlocksByMask.erase(oldMask); old->Update(me); delete me; me = old; @@ -1230,6 +1229,9 @@ void ServerConfig::ApplyModules(User* user) for (std::set::iterator removing = removed_modules.begin(); removing != removed_modules.end(); removing++) { + // Don't remove cmd_*.so, just remove m_*.so + if (removing->c_str()[0] == 'c') + continue; if (ServerInstance->Modules->Unload(removing->c_str())) { ServerInstance->SNO->WriteToSnoMask('a', "*** REHASH UNLOADED MODULE: %s",removing->c_str());