X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Fprecommand.cpp;h=c43e4e927c12566bb173dfc517a21838791887eb;hb=7e843c22e16c81054bad18073d24fe1a07026431;hp=beffba6e946a4095c7c9f85843c49837396547c8;hpb=58f4306bb6e1f91076fccf30a3b43a40b3d1915a;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/precommand.cpp b/src/modules/m_spanningtree/precommand.cpp index beffba6e9..c43e4e927 100644 --- a/src/modules/m_spanningtree/precommand.cpp +++ b/src/modules/m_spanningtree/precommand.cpp @@ -2,8 +2,8 @@ * | Inspire Internet Relay Chat Daemon | * +------------------------------------+ * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * InspIRCd: (C) 2002-2009 InspIRCd Development Team + * See: http://wiki.inspircd.org/Credits * * This program is free but copyrighted software; see * the file COPYING for details. @@ -14,25 +14,21 @@ /* $ModDesc: Provides a spanning tree server link protocol */ #include "inspircd.h" -#include "commands/cmd_whois.h" -#include "commands/cmd_stats.h" #include "socket.h" -#include "wildcard.h" #include "xline.h" -#include "transport.h" -#include "m_spanningtree/main.h" -#include "m_spanningtree/utils.h" -#include "m_spanningtree/treeserver.h" -#include "m_spanningtree/treesocket.h" +#include "main.h" +#include "utils.h" +#include "treeserver.h" +#include "treesocket.h" /* $ModDep: m_spanningtree/main.h m_spanningtree/utils.h m_spanningtree/treeserver.h m_spanningtree/treesocket.h */ -int ModuleSpanningTree::OnPreCommand(std::string &command, std::vector& parameters, User *user, bool validated, const std::string &original_line) +ModResult ModuleSpanningTree::OnPreCommand(std::string &command, std::vector& parameters, User *user, bool validated, const std::string &original_line) { /* If the command doesnt appear to be valid, we dont want to mess with it. */ if (!validated) - return 0; + return MOD_RES_PASSTHRU; if (command == "CONNECT") { @@ -56,7 +52,7 @@ int ModuleSpanningTree::OnPreCommand(std::string &command, std::vectorHandleMap(parameters,user); + return this->HandleMap(parameters,user) ? MOD_RES_DENY : MOD_RES_PASSTHRU; } else if ((command == "TIME") && (parameters.size() > 0)) { @@ -65,12 +61,12 @@ int ModuleSpanningTree::OnPreCommand(std::string &command, std::vectorHandleLusers(parameters,user); - return 1; + return MOD_RES_DENY; } else if (command == "LINKS") { this->HandleLinks(parameters,user); - return 1; + return MOD_RES_DENY; } else if (command == "WHOIS") { @@ -83,12 +79,8 @@ int ModuleSpanningTree::OnPreCommand(std::string &command, std::vector 0)) { this->HandleVersion(parameters,user); - return 1; + return MOD_RES_DENY; } - else if ((command == "MODULES") && (parameters.size() > 0)) - { - return this->HandleModules(parameters,user); - } - return 0; + return MOD_RES_PASSTHRU; }