diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/commands/cmd_rehash.cpp | 6 | ||||
-rw-r--r-- | src/inspircd.cpp | 1 | ||||
-rw-r--r-- | src/server.cpp | 9 |
3 files changed, 5 insertions, 11 deletions
diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp index 3dc454036..441ddbd2a 100644 --- a/src/commands/cmd_rehash.cpp +++ b/src/commands/cmd_rehash.cpp @@ -88,11 +88,7 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use /* Don't do anything with the logs here -- logs are restarted * after the config thread has completed. */ - FOREACH_MOD(OnGarbageCollect, ()); - - - ServerInstance->ConfigThread = new ConfigReaderThread(user->uuid); - ServerInstance->Threads->Start(ServerInstance->ConfigThread); + ServerInstance->Rehash(); } else { diff --git a/src/inspircd.cpp b/src/inspircd.cpp index 2171e2a9f..8336a4847 100644 --- a/src/inspircd.cpp +++ b/src/inspircd.cpp @@ -234,7 +234,6 @@ InspIRCd::InspIRCd(int argc, char** argv) : OperQuit("operquit", NULL), GenRandom(&HandleGenRandom), IsChannel(&HandleIsChannel), - Rehash(&HandleRehash), IsNick(&HandleIsNick), IsIdent(&HandleIsIdent), OnCheckExemption(&HandleOnCheckExemption) diff --git a/src/server.cpp b/src/server.cpp index 97b4058c0..4f58c881d 100644 --- a/src/server.cpp +++ b/src/server.cpp @@ -31,7 +31,8 @@ void InspIRCd::SignalHandler(int signal) #else if (signal == SIGHUP) { - Rehash("Caught SIGHUP"); + ServerInstance->SNO->WriteGlobalSno('a', "Rehashing due to SIGHUP"); + Rehash(); } else if (signal == SIGTERM) #endif @@ -55,13 +56,11 @@ void InspIRCd::Exit(int status) exit (status); } -void RehashHandler::Call(const std::string &reason) +void InspIRCd::Rehash(const std::string& uuid) { - ServerInstance->SNO->WriteToSnoMask('a', "Rehashing config file %s %s",ServerConfig::CleanFilename(ServerInstance->ConfigFileName.c_str()), reason.c_str()); - FOREACH_MOD(OnGarbageCollect, ()); if (!ServerInstance->ConfigThread) { - ServerInstance->ConfigThread = new ConfigReaderThread(""); + ServerInstance->ConfigThread = new ConfigReaderThread(uuid); ServerInstance->Threads->Start(ServerInstance->ConfigThread); } } |