]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/ctables.h
Whoops, forgot some stuff for when GECOS was moved to position 10 in the UID command...
[user/henk/code/inspircd.git] / include / ctables.h
index c7ccada09c27ca00ece8829521ada5f0cadbf1d7..d112e885c533b36e52100476ecffd3dd0a1804f9 100644 (file)
@@ -38,7 +38,8 @@ enum TranslateType
        TR_END,                 /* End of known parameters, everything after this is TR_TEXT */
        TR_TEXT,                /* Raw text, leave as-is */
        TR_NICK,                /* Nickname, translate to UUID for server->server */
-       TR_NICKLIST             /* Comma seperated nickname list, translate to UUIDs */
+       TR_NICKLIST,            /* Comma seperated nickname list, translate to UUIDs */
+       TR_SPACENICKLIST        /* Space seperated nickname list, translate to UUIDs */
 };
 
 /** For commands which should not be replicated to other
@@ -71,10 +72,10 @@ class CoreExport command_t : public Extensible
        int min_params;
        /** used by /stats m
         */
-       long use_count;
+       long double use_count;
        /** used by /stats m
         */
-       float total_bytes;
+       long double total_bytes;
        /** used for resource tracking between modules
         */
        std::string source;
@@ -107,7 +108,7 @@ class CoreExport command_t : public Extensible
                total_bytes = 0;
                source = "<core>";
                syntax = "";
-               translation.push_back(TR_END);
+               translation.clear();
        }
 
        /** Handle the command from a user.
@@ -179,5 +180,18 @@ class CoreExport command_t : public Extensible
  */
 typedef nspace::hash_map<std::string,command_t*> command_table;
 
+#define TRANSLATE1(x1) translation.push_back(x1);
+#define TRANSLATE2(x1,x2)  translation.push_back(x1);translation.push_back(x2);
+#define TRANSLATE3(x1,x2,x3)  translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);
+#define TRANSLATE4(x1,x2,x3,x4)  translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);
+#define TRANSLATE5(x1,x2,x3,x4,x5)  translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\
+       translation.push_back(x5);
+#define TRANSLATE6(x1,x2,x3,x4,x5,x6)  translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\
+       translation.push_back(x5);translation.push_back(x6);
+#define TRANSLATE7(x1,x2,x3,x4,x5,x6,x7)  translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\
+       translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);
+#define TRANSLATE8(x1,x2,x3,x4,x5,x6,x7,x8)  translation.push_back(x1);translation.push_back(x2);translation.push_back(x3);translation.push_back(x4);\
+       translation.push_back(x5);translation.push_back(x6);translation.push_back(x7);translation.push_back(x8);
+
 #endif