From 3ff5e57de4ceca0b3287c826b7b409e5f14196a1 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sat, 2 May 2009 15:01:32 +0000 Subject: Send rehash message to global sno, fixes bug #855. Also only send message when the rehash happens. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11344 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/commands/cmd_rehash.cpp | 19 ++++++++++--------- 1 file changed, 10 insertions(+), 9 deletions(-) diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp index e34051611..b58d6035a 100644 --- a/src/commands/cmd_rehash.cpp +++ b/src/commands/cmd_rehash.cpp @@ -49,18 +49,19 @@ CmdResult CommandRehash::Handle (const std::vector& parameters, Use ServerInstance->PI->SendUserNotice(user, std::string("*** Rehashing server ") + ServerInstance->ConfigFileName); - std::string m = user->nick + " is rehashing config file " + ServerConfig::CleanFilename(ServerInstance->ConfigFileName) + " on " + ServerInstance->Config->ServerName; - ServerInstance->SNO->WriteToSnoMask('a', m); + if (!ServerInstance->ConfigThread) + { + std::string m = user->nick + " is rehashing config file " + ServerConfig::CleanFilename(ServerInstance->ConfigFileName) + " on " + ServerInstance->Config->ServerName; + ServerInstance->SNO->WriteGlobalSno('a', m); + + /* Don't do anything with the logs here -- logs are restarted + * after the config thread has completed. + */ - /* Don't do anything with the logs here -- logs are restarted - * after the config thread has completed. - */ + ServerInstance->RehashUsersAndChans(); + FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect()); - ServerInstance->RehashUsersAndChans(); - FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect()); - if (!ServerInstance->ConfigThread) - { ServerInstance->Config->RehashUserUID = user->uuid; ServerInstance->Config->RehashParameter = parameters.size() ? parameters[0] : ""; -- cgit v1.2.3