diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-30 15:46:11 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-11-30 15:46:11 +0000 |
commit | 8b126657e79754e1d843da6c48d770937b589dab (patch) | |
tree | 4c5bbfba5002498e5b09c1884893990c6dc33c07 /src/modules | |
parent | 5a331966832a930d4770752f5e60338581830887 (diff) |
Added remote rehash (even to a mask)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2061 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index 63a68c5a9..fa22f80a1 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -706,6 +706,19 @@ class TreeSocket : public InspSocket return true; } + bool RemoteRehash(std::string prefix, std::deque<std::string> params) + { + if (params.size() < 1) + return true; + std::string servermask = params[0]; + if (Srv->MatchText(Srv->GetServerName(),servermask)) + { + Srv->RehashServer(); + } + DoOneToAllButSender(prefix,"REHASH",params,prefix); + return; + } + bool RemoteKill(std::string prefix, std::deque<std::string> params) { if (params.size() != 2) @@ -982,6 +995,10 @@ class TreeSocket : public InspSocket { return this->ForceTopic(prefix,params); } + else if (command == "REHASH") + { + return this->RemoteRehash(prefix,params); + } else if (command == "SQUIT") { if (params.size() == 2) @@ -1550,6 +1567,21 @@ class ModuleSpanningTree : public Module DoOneToMany(source->nick,"KILL",params); } + virtual void OnRehash(std::string parameter) + { + if (parameter != "") + { + std::deque<std::string> params; + params.push_back(parameter); + DoOneToMany(Srv->GetServerName(),"REHASH",params); + // check for self + if (Srv->MatchText(Srv->GetServerName(),parameter)) + { + Srv->RehashServer(); + } + } + } + // note: the protocol does not allow direct umode +o except // via NICK with 8 params. sending OPERTYPE infers +o modechange // locally. |