]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/ctables.h
This needs some testing.
[user/henk/code/inspircd.git] / include / ctables.h
index 870efadacf7bcaa6a6976ee1f9b5316e87d40955..ca2ef074b8758ddc5239001acadd948dc060a747 100644 (file)
 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! */
+       CMD_USER_DELETED = 3,   /* User was deleted! */
+};
 
 /** A structure that defines a command
  */
@@ -70,7 +78,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)
        {