1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2008 InspIRCd Development Team
6 * See: http://www.inspircd.org/wiki/index.php/Credits
8 * This program is free but copyrighted software; see
9 * the file COPYING for details.
11 * ---------------------------------------------------
14 /* $ModDesc: Provides a spanning tree server link protocol */
17 #include "commands/cmd_whois.h"
18 #include "commands/cmd_stats.h"
22 #include "transport.h"
24 #include "m_spanningtree/timesynctimer.h"
25 #include "m_spanningtree/resolvers.h"
26 #include "m_spanningtree/main.h"
27 #include "m_spanningtree/utils.h"
28 #include "m_spanningtree/treeserver.h"
29 #include "m_spanningtree/link.h"
30 #include "m_spanningtree/treesocket.h"
31 #include "m_spanningtree/rconnect.h"
32 #include "m_spanningtree/rsquit.h"
34 /* $ModDep: m_spanningtree/timesynctimer.h m_spanningtree/resolvers.h m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/link.h m_spanningtree/treesocket.h m_spanningtree/rconnect.h m_spanningtree/rsquit.h */
36 int ModuleSpanningTree::OnPreCommand(const std::string &command, const char** parameters, int pcnt, User *user, bool validated, const std::string &original_line)
38 /* If the command doesnt appear to be valid, we dont want to mess with it. */
42 if (command == "CONNECT")
44 return this->HandleConnect(parameters,pcnt,user);
46 else if (command == "STATS")
48 return this->HandleStats(parameters,pcnt,user);
50 else if (command == "MOTD")
52 return this->HandleMotd(parameters,pcnt,user);
54 else if (command == "ADMIN")
56 return this->HandleAdmin(parameters,pcnt,user);
58 else if (command == "SQUIT")
60 return this->HandleSquit(parameters,pcnt,user);
62 else if (command == "MAP")
64 this->HandleMap(parameters,pcnt,user);
67 else if ((command == "TIME") && (pcnt > 0))
69 return this->HandleTime(parameters,pcnt,user);
71 else if (command == "LUSERS")
73 this->HandleLusers(parameters,pcnt,user);
76 else if (command == "LINKS")
78 this->HandleLinks(parameters,pcnt,user);
81 else if (command == "WHOIS")
86 return this->HandleRemoteWhois(parameters,pcnt,user);
89 else if ((command == "VERSION") && (pcnt > 0))
91 this->HandleVersion(parameters,pcnt,user);
94 else if ((command == "MODULES") && (pcnt > 0))
96 return this->HandleModules(parameters,pcnt,user);