X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fcommands%2Fcmd_kill.cpp;h=88db2764de5c17e0d07662df45621e967dcccff2;hb=6d03943426dcce76ba66567a9b18425a5ebb4c0c;hp=2f1a4783e4c6e02a0b71f6f447bc1c567e17db02;hpb=86775e2e98f55b3b88befe2daff0ca23f02f3155;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/commands/cmd_kill.cpp b/src/commands/cmd_kill.cpp index 2f1a4783e..88db2764d 100644 --- a/src/commands/cmd_kill.cpp +++ b/src/commands/cmd_kill.cpp @@ -12,12 +12,26 @@ */ #include "inspircd.h" -#include "commands/cmd_kill.h" -extern "C" DllExport Command* init_command(InspIRCd* Instance) +/** Handle /KILL. 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 + * may not. + */ +class CommandKill : public Command { - return new CommandKill(Instance); -} + public: + /** Constructor for kill. + */ + CommandKill ( Module* parent) : Command(parent,"KILL",2,2) { flags_needed = 'o'; syntax = " "; } + /** Handle command. + * @param parameters The parameters to the comamnd + * @param pcnt The number of parameters passed to teh command + * @param user The user issuing the command + * @return A value from CmdResult to indicate command success or failure. + */ + CmdResult Handle(const std::vector& parameters, User *user); +}; /** Handle /KILL */ @@ -46,7 +60,7 @@ CmdResult CommandKill::Handle (const std::vector& parameters, User * Moved this event inside the IS_LOCAL check also, we don't want half the network killing a user * and the other half not. This would be a bad thing. ;p -- w00t */ - FIRST_MOD_RESULT(ServerInstance, OnKill, MOD_RESULT, (user, u, parameters[1])); + FIRST_MOD_RESULT(OnKill, MOD_RESULT, (user, u, parameters[1])); if (MOD_RESULT == MOD_RES_DENY) return CMD_FAILURE; @@ -113,3 +127,5 @@ CmdResult CommandKill::Handle (const std::vector& parameters, User return CMD_SUCCESS; } + +COMMAND_INIT(CommandKill)