X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_kick.cpp;h=65b22070c2dfdb9b3f72fcf201e37bf98ea0a7e3;hb=e50d016aa23083f81dcf181f68edb81c5b23c78d;hp=90655ba6ff46722523883e5e302e60c8c57937ad;hpb=069a2ef21425007d092342c8c11ec28da2f410d7;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_kick.cpp b/src/commands/cmd_kick.cpp index 90655ba6f..65b22070c 100644 --- a/src/commands/cmd_kick.cpp +++ b/src/commands/cmd_kick.cpp @@ -13,14 +13,6 @@ #include "inspircd.h" -#ifndef __CMD_KICK_H__ -#define __CMD_KICK_H__ - -// include the common header files - -#include "users.h" -#include "channels.h" - /** Handle /KICK. These command handlers can be reloaded by the core, * and handle basic RFC1459 commands. Commands within modules work * the same way, however, they can be fully unloaded, where these @@ -31,7 +23,7 @@ class CommandKick : public Command public: /** Constructor for kick. */ - CommandKick ( Module* parent) : Command(parent,"KICK",0,2) { syntax = " {,} []"; } + CommandKick ( Module* parent) : Command(parent,"KICK",2,3) { syntax = " {,} []"; } /** Handle command. * @param parameters The parameters to the comamnd * @param pcnt The number of parameters passed to teh command @@ -41,8 +33,6 @@ class CommandKick : public Command CmdResult Handle(const std::vector& parameters, User *user); }; -#endif - /** Handle /KICK */ @@ -76,9 +66,7 @@ CmdResult CommandKick::Handle (const std::vector& parameters, User reason.assign(user->nick, 0, ServerInstance->Config->Limits.MaxKick); } - if (!c->KickUser(user, u, reason.c_str())) - /* Nobody left here, delete the Channel */ - delete c; + c->KickUser(user, u, reason.c_str()); return CMD_SUCCESS; }