]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/server.cpp
Make rehash generate a new ServerInstance->Config object
[user/henk/code/inspircd.git] / src / server.cpp
index 56970054d4a67de5e779ae5e88a4775ac3795c43..01f523e4708ff5af90efed6af6b4f82210cbeaaf 100644 (file)
@@ -48,19 +48,14 @@ void InspIRCd::Exit(int status)
 
 void RehashHandler::Call(const std::string &reason)
 {
-       Server->RehashFinishMutex->Lock();
-       Server->SNO->WriteToSnoMask('A', "Rehashing config file %s %s",ServerConfig::CleanFilename(Server->ConfigFileName), reason.c_str());
+       Server->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(Server->ConfigFileName), reason.c_str());
        Server->RehashUsersAndChans();
        FOREACH_MOD_I(Server, I_OnGarbageCollect, OnGarbageCollect());
        if (!Server->ConfigThread)
        {
-               Server->Config->RehashUserUID = "";
-               Server->Config->RehashParameter = "";
-
-               Server->ConfigThread = new ConfigReaderThread(Server, false, "");
-               Server->Threads->Create(Server->ConfigThread);
+               Server->ConfigThread = new ConfigReaderThread(Server, "");
+               Server->Threads->Start(Server->ConfigThread);
        }
-       Server->RehashFinishMutex->Unlock();
 }
 
 void InspIRCd::RehashServer()