X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_sakick.cpp;h=2cb1f2a0449f1f521e7e8c69c34b4eb19a5b5f66;hb=6c2edc2c5ab07a1fa8c32d3fa9abd6b9149b804c;hp=cd0b07477bc990ad503c0c0c10b1a60c5c488b4d;hpb=7d93921aabd9c608821baec8a871aff844dfae49;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_sakick.cpp b/src/modules/m_sakick.cpp index cd0b07477..2cb1f2a04 100644 --- a/src/modules/m_sakick.cpp +++ b/src/modules/m_sakick.cpp @@ -1,16 +1,23 @@ -/* +------------------------------------+ - * | 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 John Brooks + * Copyright (C) 2009 Daniel De Graaf * - * 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" /* $ModDesc: Provides a SAKICK command */ @@ -31,7 +38,6 @@ class CommandSakick : public Command User* dest = ServerInstance->FindNick(parameters[1]); Channel* channel = ServerInstance->FindChan(parameters[0]); const char* reason = ""; - const char* servername = NULL; if (dest && channel) { @@ -56,8 +62,7 @@ class CommandSakick : public Command */ if (IS_LOCAL(dest)) { - if (!channel->ServerKickUser(dest, reason, servername)) - delete channel; + channel->KickUser(ServerInstance->FakeClient, dest, reason); Channel *n = ServerInstance->FindChan(parameters[1]); if (n && n->HasUser(dest)) @@ -97,8 +102,8 @@ class ModuleSakick : public Module { CommandSakick cmd; public: - ModuleSakick(InspIRCd* Me) - : Module(Me), cmd(this) + ModuleSakick() + : cmd(this) { ServerInstance->AddCommand(&cmd); } @@ -109,7 +114,7 @@ class ModuleSakick : public Module virtual Version GetVersion() { - return Version("Provides a SAKICK command", VF_OPTCOMMON|VF_VENDOR, API_VERSION); + return Version("Provides a SAKICK command", VF_OPTCOMMON|VF_VENDOR); } };