]> git.netwichtig.de Git - user/henk/code/inspircd.git/blob - src/modules/m_spanningtree/svsjoin.cpp
Update Event and Request APIs
[user/henk/code/inspircd.git] / src / modules / m_spanningtree / svsjoin.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 "socketengine.h"
18
19 #include "main.h"
20 #include "utils.h"
21 #include "treeserver.h"
22 #include "treesocket.h"
23
24 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
25
26 bool TreeSocket::ServiceJoin(const std::string &prefix, parameterlist &params)
27 {
28         if (params.size() < 2)
29                 return true;
30
31         User* u = ServerInstance->FindNick(params[0]);
32
33         if (u)
34         {
35                 /* only join if it's local, otherwise just pass it on! */
36                 if (IS_LOCAL(u))
37                         Channel::JoinUser(u, params[1].c_str(), false, "", false, ServerInstance->Time());
38                 Utils->DoOneToAllButSender(prefix,"SVSJOIN",params,prefix);
39         }
40         return true;
41 }
42