diff options
-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) |