diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-06 14:29:23 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-06 14:29:23 +0000 |
commit | 5c8c4d0f8c7a115d7e73c6d1b75f21e72f771a22 (patch) | |
tree | 14d9e28ce5c5ee9af461312670c3b6ba13c81a88 /src/modules | |
parent | fabcb7be8fcfb1d23dca051ccc5fad31c9ce7bbf (diff) |
SVSNICK and SVSJOIN
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2226 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/modules')
-rw-r--r-- | src/modules/m_spanningtree.cpp | 34 |
1 files changed, 34 insertions, 0 deletions
diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index e3aea5f04..dcce01720 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -950,6 +950,32 @@ class TreeSocket : public InspSocket return true; } + bool ForceNick(std::string prefix, std::deque<std::string> params) + { + if (params.size() < 3) + return true; + userrec* u = Srv->FindNick(params[0]); + if (u) + { + Srv->ChangeUserNick(u,params[1]); + DoOneToAllButSender(prefix,"SVSNICK",params,prefix); + } + return true; + } + + bool ServiceJoin(std::string prefix, std::deque<std::string> params) + { + if (params.size() < 2) + return true; + userrec* u = Srv->FindNick(params[0]); + if (u) + { + Srv->JoinUserToChannel(u,params[1],""); + DoOneToAllButSender(prefix,"SVSJOIN",params,prefix); + } + return true; + } + bool RemoteRehash(std::string prefix, std::deque<std::string> params) { if (params.size() < 1) @@ -1407,6 +1433,14 @@ class TreeSocket : public InspSocket { return this->AddLine(prefix,params); } + else if (command == "SVSNICK") + { + return this->ForceNick(prefix,params); + } + else if (command == "SVSJOIN") + { + return this->ServiceJoin(prefix,params); + } else if (command == "SQUIT") { if (params.size() == 2) |