2 * InspIRCd -- Internet Relay Chat Daemon
4 * Copyright (C) 2013, 2018 Sadie Powell <sadie@witchery.services>
5 * Copyright (C) 2012 Robby <robby@chatbelgie.be>
6 * Copyright (C) 2009-2010 Daniel De Graaf <danieldg@inspircd.org>
7 * Copyright (C) 2008 Thomas Stagner <aquanight@inspircd.org>
8 * Copyright (C) 2007, 2010 Craig Edwards <brain@inspircd.org>
10 * This file is part of InspIRCd. InspIRCd is free software: you can
11 * redistribute it and/or modify it under the terms of the GNU General Public
12 * License as published by the Free Software Foundation, version 2.
14 * This program is distributed in the hope that it will be useful, but WITHOUT
15 * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
16 * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more
19 * You should have received a copy of the GNU General Public License
20 * along with this program. If not, see <http://www.gnu.org/licenses/>.
28 ModResult ModuleSpanningTree::OnPreCommand(std::string &command, CommandBase::Params& parameters, LocalUser *user, bool validated)
30 /* If the command doesnt appear to be valid, we dont want to mess with it. */
32 return MOD_RES_PASSTHRU;
34 if (command == "CONNECT")
36 return this->HandleConnect(parameters,user);
38 else if (command == "SQUIT")
40 return this->HandleSquit(parameters,user);
42 else if (command == "LINKS")
44 this->HandleLinks(parameters,user);
47 else if (command == "WHOIS")
49 if (parameters.size() > 1)
52 return this->HandleRemoteWhois(parameters,user);
55 else if ((command == "VERSION") && (parameters.size() > 0))
57 return this->HandleVersion(parameters,user);
59 return MOD_RES_PASSTHRU;