X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_spanningtree%2Foverride_squit.cpp;h=2a95acb407633a653971ca637029b4704bf1ec20;hb=b998720a5f6f66e80c88a5448435943d5927abf3;hp=d73408a45fb1474b3a493adb1f1ec9d341144b33;hpb=a1a7b96a8c994eb09a3d071f3daf28252b8c188b;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_spanningtree/override_squit.cpp b/src/modules/m_spanningtree/override_squit.cpp index d73408a45..2a95acb40 100644 --- a/src/modules/m_spanningtree/override_squit.cpp +++ b/src/modules/m_spanningtree/override_squit.cpp @@ -1,33 +1,36 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2008 InspIRCd Development Team - * See: http://www.inspircd.org/wiki/index.php/Credits + * Copyright (C) 2007 Craig Edwards * - * This program is free but copyrighted software; see - * the file COPYING for details. + * This file is part of InspIRCd. InspIRCd is free software: you can + * redistribute it and/or modify it under the terms of the GNU General Public + * License as published by the Free Software Foundation, version 2. * - * --------------------------------------------------- + * This program is distributed in the hope that it will be useful, but WITHOUT + * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS + * FOR A PARTICULAR PURPOSE. See the GNU General Public License for more + * details. + * + * You should have received a copy of the GNU General Public License + * along with this program. If not, see . */ + /* $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 "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::HandleSquit(const std::vector& parameters, User* user) +ModResult ModuleSpanningTree::HandleSquit(const std::vector& parameters, User* user) { TreeServer* s = Utils->FindServerMask(parameters[0]); if (s) @@ -35,7 +38,7 @@ int ModuleSpanningTree::HandleSquit(const std::vector& parameters, if (s == Utils->TreeRoot) { user->WriteServ("NOTICE %s :*** SQUIT: Foolish mortal, you cannot make a server SQUIT itself! (%s matches local server name)",user->nick.c_str(),parameters[0].c_str()); - return 1; + return MOD_RES_DENY; } TreeSocket* sock = s->GetSocket(); @@ -56,6 +59,6 @@ int ModuleSpanningTree::HandleSquit(const std::vector& parameters, { user->WriteServ("NOTICE %s :*** SQUIT: The server \002%s\002 does not exist on the network.",user->nick.c_str(),parameters[0].c_str()); } - return 1; + return MOD_RES_DENY; }