From 5c8c4d0f8c7a115d7e73c6d1b75f21e72f771a22 Mon Sep 17 00:00:00 2001 From: brain Date: Tue, 6 Dec 2005 14:29:23 +0000 Subject: [PATCH] SVSNICK and SVSJOIN git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2226 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) 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 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 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 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) -- 2.39.5