]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/m_spanningtree/push.cpp
Update all wiki links to point to the new wiki. This was done automatically with...
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / push.cpp
1 /*       +------------------------------------+
2  *       | Inspire Internet Relay Chat Daemon |
3  *       +------------------------------------+
4  *
5  *  InspIRCd: (C) 2002-2009 InspIRCd Development Team
6  * See: http://wiki.inspircd.org/Credits
7  *
8  * This program is free but copyrighted software; see
9  *            the file COPYING for details.
10  *
11  * ---------------------------------------------------
12  */
13
14 #include "inspircd.h"
15 #include "commands/cmd_whois.h"
16 #include "commands/cmd_stats.h"
17 #include "socket.h"
18 #include "xline.h"
19 #include "transport.h"
20 #include "socketengine.h"
21
22 #include "m_spanningtree/main.h"
23 #include "m_spanningtree/utils.h"
24 #include "m_spanningtree/treeserver.h"
25 #include "m_spanningtree/treesocket.h"
26
27 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
28
29 bool TreeSocket::Push(const std::string &prefix, std::deque<std::string> &params)
30 {
31         if (params.size() < 2)
32                 return true;
33         User* u = this->ServerInstance->FindNick(params[0]);
34         if (!u)
35                 return true;
36         if (IS_LOCAL(u))
37         {
38                 u->Write(params[1]);
39         }
40         else
41         {
42                 // continue the raw onwards
43                 params[1] = ":" + params[1];
44                 Utils->DoOneToOne(prefix,"PUSH",params,u->server);
45         }
46         return true;
47 }
48