aboutsummaryrefslogtreecommitdiffstats
path: root/src/server.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/server.cpp')
-rw-r--r--src/server.cpp10
1 files changed, 4 insertions, 6 deletions
diff --git a/src/server.cpp b/src/server.cpp
index a52cde91f..a95fcece1 100644
--- a/src/server.cpp
+++ b/src/server.cpp
@@ -47,13 +47,11 @@ void InspIRCd::Exit(int status)
void InspIRCd::Rehash(const std::string &reason)
{
- ServerInstance->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()), reason.c_str());
- ServerInstance->RehashUsersAndChans();
- FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
- if (!ServerInstance->ConfigThread)
+ if (!ServerInstance->PendingRehash)
{
- ServerInstance->ConfigThread = new ConfigReaderThread("");
- ServerInstance->Threads->Start(ServerInstance->ConfigThread);
+ ServerInstance->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()), reason.c_str());
+ ServerInstance->PendingRehash = new ConfigReaderThread("");
+ ServerInstance->Threads->Submit(ServerInstance->PendingRehash);
}
}