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 --- include/ctables.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'include/ctables.h') diff --git a/include/ctables.h b/include/ctables.h index 870efadac..9adf6c37c 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -25,7 +25,14 @@ class userrec; class InspIRCd; -/*typedef void (handlerfunc) (char**, int, userrec*);*/ +/** Used to indicate command success codes + */ +enum CmdResult +{ + CMD_FAILURE = 0, /* Command exists, but failed */ + CMD_SUCCESS = 1, /* Command exists, and succeeded */ + CMD_INVALID = 2, /* Command doesnt exist at all! */ +}; /** A structure that defines a command */ @@ -70,7 +77,7 @@ class command_t : public Extensible syntax = ""; } - virtual void Handle(const char** parameters, int pcnt, userrec* user) = 0; + virtual CmdResult Handle(const char** parameters, int pcnt, userrec* user) = 0; void Disable(bool setting) { -- cgit v1.2.3