]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/configreader.cpp
Replace OnAccessCheck with OnPreMode to remove a number of redundant checks
[user/henk/code/inspircd.git] / src / configreader.cpp
index eaea3f006567fecad841f691794b55d3e9185f83..8d705f0cae6b46f99e59fc3fd85e78c7f3096185 100644 (file)
@@ -442,11 +442,10 @@ static bool ValidateWhoWas(ServerConfig* conf, const char*, const char*, ValueIt
                conf->GetInstance()->Logs->Log("CONFIG",DEFAULT,"WARNING: <whowas:maxkeep> 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<classbase*> params;
-               whowas_command->HandleInternal(WHOWAS_PRUNE, params);
+               WhowasRequest(NULL, whowas, WhowasRequest::WHOWAS_PRUNE).Send();
        }
 
        return true;
@@ -1230,6 +1229,9 @@ void ServerConfig::ApplyModules(User* user)
 
        for (std::set<std::string>::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());