X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;ds=sidebyside;f=src%2Fcommands%2Fcmd_mode.cpp;h=1a42835e501ccd6929d9b72ed427017ce62f312c;hb=9962840222b6886f7653fc64443f19ebd661cc63;hp=3cfc58263b72da251d3d60a64153cf0e8ebf36ad;hpb=3841c4b04a96389a4661535d12d5215a621d8736;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_mode.cpp b/src/commands/cmd_mode.cpp index 3cfc58263..1a42835e5 100644 --- a/src/commands/cmd_mode.cpp +++ b/src/commands/cmd_mode.cpp @@ -1,24 +1,24 @@ -/* +------------------------------------+ - * | Inspire Internet Relay Chat Daemon | - * +------------------------------------+ +/* + * InspIRCd -- Internet Relay Chat Daemon * - * InspIRCd: (C) 2002-2009 InspIRCd Development Team - * See: http://wiki.inspircd.org/Credits + * Copyright (C) 2009 Daniel De Graaf + * Copyright (C) 2007 Robin Burchell * - * 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 . */ -#include "inspircd.h" - -#ifndef __CMD_ADMIN_H__ -#define __CMD_ADMIN_H__ -#include "users.h" -#include "channels.h" -#include "ctables.h" +#include "inspircd.h" /** Handle /MODE. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work @@ -38,16 +38,18 @@ class CommandMode : public Command * @return A value from CmdResult to indicate command success or failure. */ CmdResult Handle(const std::vector& parameters, User *user); + RouteDescriptor GetRouting(User* user, const std::vector& parameters) + { + return (IS_LOCAL(user) ? ROUTE_LOCALONLY : ROUTE_BROADCAST); + } }; -#endif - /** Handle /MODE */ CmdResult CommandMode::Handle (const std::vector& parameters, User *user) { - ServerInstance->Modes->Process(parameters, user, false); + ServerInstance->Modes->Process(parameters, user, (IS_LOCAL(user) ? ModeParser::MODE_NONE : ModeParser::MODE_LOCALONLY)); return CMD_SUCCESS; }