summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/commands/cmd_rehash.cpp7
-rw-r--r--src/modules/m_spanningtree/main.cpp3
2 files changed, 6 insertions, 4 deletions
diff --git a/src/commands/cmd_rehash.cpp b/src/commands/cmd_rehash.cpp
index 1fa6e5731..abf0b7876 100644
--- a/src/commands/cmd_rehash.cpp
+++ b/src/commands/cmd_rehash.cpp
@@ -94,8 +94,6 @@ CmdResult CommandRehash::Handle (const std::vector<std::string>& parameters, Use
ServerInstance->ConfigThread = new ConfigReaderThread(user->uuid);
ServerInstance->Threads->Start(ServerInstance->ConfigThread);
-
- return CMD_SUCCESS;
}
else
{
@@ -107,9 +105,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;
}
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp
index b8540cf27..ffc466a82 100644
--- a/src/modules/m_spanningtree/main.cpp
+++ b/src/modules/m_spanningtree/main.cpp
@@ -754,6 +754,9 @@ void ModuleSpanningTree::OnRemoteKill(User* source, User* dest, const std::strin
void ModuleSpanningTree::OnPreRehash(User* user, const std::string &parameter)
{
+ if (loopCall)
+ return; // Don't generate a REHASH here if we're in the middle of processing a message that generated this one
+
ServerInstance->Logs->Log("remoterehash", DEBUG, "called with param %s", parameter.c_str());
// Send out to other servers