]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/m_spanningtree/push.cpp
Introduce "X" snomask for remote *:line messages [patch by jackmcbarn]
[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 "socket.h"
16 #include "xline.h"
17 #include "../transport.h"
18 #include "socketengine.h"
19
20 #include "main.h"
21 #include "utils.h"
22 #include "treeserver.h"
23 #include "treesocket.h"
24
25 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
26
27 bool TreeSocket::Push(const std::string &prefix, parameterlist &params)
28 {
29         if (params.size() < 2)
30                 return true;
31         User* u = this->ServerInstance->FindNick(params[0]);
32         if (!u)
33                 return true;
34         if (IS_LOCAL(u))
35         {
36                 u->Write(params[1]);
37         }
38         else
39         {
40                 // continue the raw onwards
41                 params[1] = ":" + params[1];
42                 Utils->DoOneToOne(prefix,"PUSH",params,u->server);
43         }
44         return true;
45 }
46