X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=include%2Fctables.h;h=9376dbbcc4df88a2a4761079b27ad541dec90369;hb=7f7ffef3b4d5dc6242918a48713d6fab96928a80;hp=abf65f56127122f2e742b76592b3b65fdd8f23fe;hpb=8c71a2a6304f0d77aa7738e04a44f366a158cadd;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/include/ctables.h b/include/ctables.h index abf65f561..9376dbbcc 100644 --- a/include/ctables.h +++ b/include/ctables.h @@ -23,14 +23,17 @@ #pragma once -/** Used to indicate command success codes - */ +/** Used to indicate the result of trying to execute a command. */ 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_EPERM = 3 /* Command failed because of a permission check */ + /** The command exists but its execution failed. */ + CMD_FAILURE = 0, + + /** The command exists and its execution succeeded. */ + CMD_SUCCESS = 1, + + /* The command does not exist. */ + CMD_INVALID = 2 }; /** Flag for commands that are only allowed from servers */ @@ -218,6 +221,10 @@ class CoreExport Command : public CommandBase */ virtual CmdResult Handle(const std::vector& parameters, User* user) = 0; + /** Register this object in the CommandParser + */ + void RegisterService() CXX11_OVERRIDE; + /** Destructor * Removes this command from the command parser */