*/
#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 = "<nickname> <reason>"; }
+ /** 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<std::string>& parameters, User *user);
+};
/** Handle /KILL
*/
* 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;
return CMD_SUCCESS;
}
+
+COMMAND_INIT(CommandKill)