From 31fdbf70b7bd549cbc5ca92c799de68068d0898d Mon Sep 17 00:00:00 2001 From: brain Date: Sat, 11 Feb 2006 17:19:09 +0000 Subject: Added PUSH command, do not use yet until tested and documented git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3153 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_spanningtree.cpp | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) (limited to 'src/modules/m_spanningtree.cpp') diff --git a/src/modules/m_spanningtree.cpp b/src/modules/m_spanningtree.cpp index e859ff844..0bea7f896 100644 --- a/src/modules/m_spanningtree.cpp +++ b/src/modules/m_spanningtree.cpp @@ -1664,6 +1664,24 @@ class TreeSocket : public InspSocket } return true; } + + bool Push(std::string prefix, std::deque ¶ms) + { + if (params.size() < 2) + return true; + userrec* u = Srv->FindNick(params[0]); + if (IS_LOCAL(u)) + { + // push the raw to the user + ::Write(u->fd,"%s",params[1].c_str()); + } + else + { + // continue the raw onwards + DoOneToOne(prefix,"PUSH",params,u->server); + } + return true; + } bool LocalPing(std::string prefix, std::deque ¶ms) { @@ -2114,6 +2132,10 @@ class TreeSocket : public InspSocket { return this->Whois(prefix,params); } + else if (command == "PUSH") + { + return this->Push(prefix,params); + } else if (command == "SVSJOIN") { if (prefix == "") -- cgit v1.2.3