]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/ctables.h
More docs. Tons more docs. I need coffee and we're out of coffee :<
[user/henk/code/inspircd.git] / include / ctables.h
index 26140c607578f5617e00b0c75ca79463607a0f0f..c997cf68a7eca883bcb2e1e2ed6f3c2b90cfc226 100644 (file)
@@ -23,6 +23,7 @@
 #include "base.h"
 
 class userrec;
+class InspIRCd;
 
 /*typedef void (handlerfunc) (char**, int, userrec*);*/
 
@@ -30,6 +31,8 @@ class userrec;
  */
 class command_t : public Extensible
 {
+ protected:
+       InspIRCd* ServerInstance;
  public:
        /** Command name
        */
@@ -52,11 +55,16 @@ class command_t : public Extensible
        /** True if the command is disabled to non-opers
         */
        bool disabled;
+       /** Syntax string for the command, displayed if non-empty string.
+        * This takes place of the text in the 'not enough parameters' numeric.
+        */
+       std::string syntax;
 
-       command_t(const std::string &cmd, char flags, int minpara) : command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
+       command_t(InspIRCd* Instance, const std::string &cmd, char flags, int minpara) : ServerInstance(Instance), command(cmd), flags_needed(flags), min_params(minpara), disabled(false)
        {
                use_count = total_bytes = 0;
                source = "<core>";
+               syntax = "";
        }
 
        virtual void Handle(const char** parameters, int pcnt, userrec* user) = 0;