From 4cf0ae1308fe98757de42ffbe391e61844ac9e0a Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 6 Sep 2006 17:21:59 +0000 Subject: Command result codes. This isnt finished yet, still got to do most of the modules, and alter CallCommandHandler git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5149 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/cmd_kill.cpp | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'src/cmd_kill.cpp') diff --git a/src/cmd_kill.cpp b/src/cmd_kill.cpp index 91dbca8bd..6fe855a19 100644 --- a/src/cmd_kill.cpp +++ b/src/cmd_kill.cpp @@ -26,7 +26,7 @@ extern "C" command_t* init_command(InspIRCd* Instance) return new cmd_kill(Instance); } -void cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) +CmdResult cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) { userrec *u = ServerInstance->FindNick(parameters[0]); char killreason[MAXBUF]; @@ -42,7 +42,7 @@ void cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) if (MOD_RESULT) { ServerInstance->Log(DEBUG, "A module prevented the kill with result %d", MOD_RESULT); - return; + return CMD_FAILURE; } if (!IS_LOCAL(u)) @@ -81,6 +81,9 @@ void cmd_kill::Handle (const char** parameters, int pcnt, userrec *user) else { user->WriteServ( "401 %s %s :No such nick/channel", user->nick, parameters[0]); + return CMD_FAILURE; } + + return CMD_SUCCESS; } -- cgit v1.2.3