]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/commands/cmd_rehash.cpp
Stop recreating hashmaps every hour, move garbage collection code related to local...
[user/henk/code/inspircd.git] / src / commands / cmd_rehash.cpp
index 1fa6e5731b8c730c07c7ac372c6ef83dee3d14c6..1ad96d794b10534e375216bafbb7e4d88a3dbe24 100644 (file)
@@ -88,14 +88,11 @@ 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.
                 */
-               ServerInstance->RehashUsersAndChans();
                FOREACH_MOD(I_OnGarbageCollect, OnGarbageCollect());
 
 
                ServerInstance->ConfigThread = new ConfigReaderThread(user->uuid);
                ServerInstance->Threads->Start(ServerInstance->ConfigThread);
-
-               return CMD_SUCCESS;
        }
        else
        {
@@ -107,9 +104,10 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use
                        user->WriteServ("NOTICE %s :*** Could not rehash: A rehash is already in progress.", user->nick.c_str());
                else
                        ServerInstance->PI->SendUserNotice(user, "*** Could not rehash: A rehash is already in progress.");
-
-               return CMD_FAILURE;
        }
+
+       // Always return success so spanningtree forwards an incoming REHASH even if we failed
+       return CMD_SUCCESS;
 }