1 /* +------------------------------------+
2 * | Inspire Internet Relay Chat Daemon |
3 * +------------------------------------+
5 * InspIRCd: (C) 2002-2010 InspIRCd Development Team
6 * See: http://wiki.inspircd.org/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 */
22 #include "treeserver.h"
23 #include "treesocket.h"
25 /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */
27 ModResult ModuleSpanningTree::OnPreCommand(std::string &command, std::vector<std::string>& parameters, LocalUser *user, bool validated, const std::string &original_line)
29 /* If the command doesnt appear to be valid, we dont want to mess with it. */
31 return MOD_RES_PASSTHRU;
33 if (command == "CONNECT")
35 return this->HandleConnect(parameters,user);
37 else if (command == "SQUIT")
39 return this->HandleSquit(parameters,user);
41 else if (command == "MAP")
43 return this->HandleMap(parameters,user) ? MOD_RES_DENY : MOD_RES_PASSTHRU;
45 else if (command == "LINKS")
47 this->HandleLinks(parameters,user);
50 else if (command == "WHOIS")
52 if (parameters.size() > 1)
55 return this->HandleRemoteWhois(parameters,user);
58 else if ((command == "VERSION") && (parameters.size() > 0))
60 this->HandleVersion(parameters,user);
63 return MOD_RES_PASSTHRU;