diff options
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree/main.cpp | 17 | ||||
-rw-r--r-- | src/modules/m_spanningtree/rehash.cpp | 48 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket.h | 4 | ||||
-rw-r--r-- | src/modules/m_spanningtree/treesocket2.cpp | 4 |
4 files changed, 8 insertions, 65 deletions
diff --git a/src/modules/m_spanningtree/main.cpp b/src/modules/m_spanningtree/main.cpp index 92df0c468..102fc4b13 100644 --- a/src/modules/m_spanningtree/main.cpp +++ b/src/modules/m_spanningtree/main.cpp @@ -741,20 +741,19 @@ void ModuleSpanningTree::OnRemoteKill(User* source, User* dest, const std::strin void ModuleSpanningTree::OnRehash(User* user, const std::string ¶meter) { - if (!parameter.empty()) + ServerInstance->Logs->Log("remoterehash", DEBUG, "called with param %s", parameter.c_str()); + + // Send out to other servers + if (!parameter.empty() && parameter[0] != '-') { + ServerInstance->Logs->Log("remoterehash", DEBUG, "sending out lol"); std::deque<std::string> params; params.push_back(parameter); - Utils->DoOneToMany(user ? user->nick : ServerInstance->Config->GetSID(), "REHASH", params); - // check for self - if (ServerInstance->MatchText(ServerInstance->Config->ServerName,parameter)) - { - ServerInstance->SNO->WriteToSnoMask('A', "Remote rehash initiated locally by \002%s\002", user ? user->nick : ServerInstance->Config->ServerName); - ServerInstance->RehashServer(); - } + Utils->DoOneToAllButSender(user ? user->uuid : ServerInstance->Config->GetSID(), "REHASH", params, user ? user->server : ServerInstance->Config->GetSID()); /// Can this take SID? } + + // Re-read config stuff Utils->ReadConfiguration(true); - InitializeDisabledCommands(ServerInstance->Config->DisabledCommands, ServerInstance); } // note: the protocol does not allow direct umode +o except diff --git a/src/modules/m_spanningtree/rehash.cpp b/src/modules/m_spanningtree/rehash.cpp deleted file mode 100644 index 6707b897a..000000000 --- a/src/modules/m_spanningtree/rehash.cpp +++ /dev/null @@ -1,48 +0,0 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ - * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits - * - * This program is free but copyrighted software; see - * the file COPYING for details. - * - * --------------------------------------------------- - */ - -#include "inspircd.h" -#include "commands/cmd_whois.h" -#include "commands/cmd_stats.h" -#include "socket.h" -#include "wildcard.h" -#include "xline.h" -#include "transport.h" -#include "socketengine.h" - -#include "m_spanningtree/main.h" -#include "m_spanningtree/utils.h" -#include "m_spanningtree/treeserver.h" -#include "m_spanningtree/link.h" -#include "m_spanningtree/treesocket.h" -#include "m_spanningtree/resolvers.h" -#include "m_spanningtree/handshaketimer.h" - -/* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h */ - -bool TreeSocket::RemoteRehash(const std::string &prefix, std::deque<std::string> ¶ms) -{ - if (params.size() < 1) - return false; - - std::string servermask = params[0]; - - if (this->Instance->MatchText(this->Instance->Config->ServerName,servermask)) - { - this->Instance->SNO->WriteToSnoMask('l',"Remote rehash initiated by \002"+prefix+"\002."); - this->Instance->RehashServer(); - } - Utils->DoOneToAllButSender(prefix,"REHASH",params,prefix); - return true; -} - diff --git a/src/modules/m_spanningtree/treesocket.h b/src/modules/m_spanningtree/treesocket.h index a33e33c88..324203f11 100644 --- a/src/modules/m_spanningtree/treesocket.h +++ b/src/modules/m_spanningtree/treesocket.h @@ -312,10 +312,6 @@ class TreeSocket : public BufferedSocket */ bool ServicePart(const std::string &prefix, std::deque<std::string> ¶ms); - /** REHASH - */ - bool RemoteRehash(const std::string &prefix, std::deque<std::string> ¶ms); - /** KILL */ bool RemoteKill(const std::string &prefix, std::deque<std::string> ¶ms); diff --git a/src/modules/m_spanningtree/treesocket2.cpp b/src/modules/m_spanningtree/treesocket2.cpp index c99402af0..aa7d2b2af 100644 --- a/src/modules/m_spanningtree/treesocket2.cpp +++ b/src/modules/m_spanningtree/treesocket2.cpp @@ -392,10 +392,6 @@ bool TreeSocket::ProcessLine(std::string &line) { return this->ForceTopic(prefix,params); } - else if (command == "REHASH") - { - return this->RemoteRehash(prefix,params); - } else if (command == "METADATA") { return this->MetaData(prefix,params); |