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/main.h"
25 #include "m_spanningtree/utils.h"
26 #include "m_spanningtree/treeserver.h"
27 #include "m_spanningtree/treesocket.h"
29 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
31 int ModuleSpanningTree::OnPreCommand(std::string &command, std::vector<std::string>& parameters, User *user, bool validated, const std::string &original_line)
33 /* If the command doesnt appear to be valid, we dont want to mess with it. */
37 if (command == "CONNECT")
39 return this->HandleConnect(parameters,user);
41 else if (command == "STATS")
43 return this->HandleStats(parameters,user);
45 else if (command == "MOTD")
47 return this->HandleMotd(parameters,user);
49 else if (command == "ADMIN")
51 return this->HandleAdmin(parameters,user);
53 else if (command == "SQUIT")
55 return this->HandleSquit(parameters,user);
57 else if (command == "MAP")
59 return this->HandleMap(parameters,user);
61 else if ((command == "TIME") && (parameters.size() > 0))
63 return this->HandleTime(parameters,user);
65 else if (command == "LUSERS")
67 this->HandleLusers(parameters,user);
70 else if (command == "LINKS")
72 this->HandleLinks(parameters,user);
75 else if (command == "WHOIS")
77 if (parameters.size() > 1)
80 return this->HandleRemoteWhois(parameters,user);
83 else if ((command == "VERSION") && (parameters.size() > 0))
85 this->HandleVersion(parameters,user);
88 else if ((command == "MODULES") && (parameters.size() > 0))
90 return this->HandleModules(parameters,user);