]> jfr.im git - solanum.git/blobdiff - include/modules.h
Can IGNORE_BOGUS_TS at the behest of @kaniini and @jilest
[solanum.git] / include / modules.h
index 1a6e0a61569267462430ff5b34aa83740c6179e4..b2ff535bfb3a007f3aafab2d71042d7aa89c6b68 100644 (file)
@@ -24,6 +24,7 @@
 
 #ifndef INCLUDED_modules_h
 #define INCLUDED_modules_h
+#include "serno.h"
 #include "config.h"
 #include "setup.h"
 #include "parse.h"
@@ -78,7 +79,7 @@ typedef struct
        int cap_index;          /* Which cap index does this belong to? */
        const char *cap_name;   /* Capability name */
        void *cap_ownerdata;    /* Not used much but why not... */
-       int *cap_id;            /* May be set to non-NULL to store cap id */
+       unsigned int *cap_id;   /* May be set to non-NULL to store cap id */
 } mapi_cap_list_av2;
 
 struct mapi_mheader_av1
@@ -93,14 +94,12 @@ struct mapi_mheader_av1
 };
 
 #define MAPI_ORIGIN_UNKNOWN    0               /* Unknown provenance (AV1 etc.) */
-#define MAPI_ORIGIN_EXTERNAL   1               /* Came from outside charybdis */
-#define MAPI_ORIGIN_EXTENSION  2               /* Charybdis bundled extension */
-#define MAPI_ORIGIN_CORE       3               /* Charybdis core module */
+#define MAPI_ORIGIN_EXTENSION  1               /* Charybdis extension */
+#define MAPI_ORIGIN_CORE       2               /* Charybdis core module */
 
 struct mapi_mheader_av2
 {
        int mapi_version;                       /* Module API version */
-       int mapi_origin;                        /* Module provenance */
        int (*mapi_register)(void);             /* Register function; ret -1 = failure (unload) */
        void (*mapi_unregister)(void);          /* Unregister function. */
        mapi_clist_av1 *mapi_command_list;      /* List of commands to add. */
@@ -109,13 +108,14 @@ struct mapi_mheader_av2
        mapi_cap_list_av2 *mapi_cap_list;       /* List of CAPs to add */
        const char *mapi_module_version;        /* Module's version (freeform), replaced with ircd version if NULL */
        const char *mapi_module_description;    /* Module's description (freeform) */
+       unsigned long int mapi_datecode;        /* Unix timestamp of module's build */
 };
 
 #define DECLARE_MODULE_AV1(name, reg, unreg, cl, hl, hfnlist, v) \
        struct mapi_mheader_av1 _mheader = { MAPI_V1, reg, unreg, cl, hl, hfnlist, v}
 
-#define DECLARE_MODULE_AV2(name, origin, reg, unreg, cl, hl, hfnlist, caplist, v, desc) \
-       struct mapi_mheader_av2 _mheader = { MAPI_V2, origin, reg, unreg, cl, hl, hfnlist, caplist, v, desc}
+#define DECLARE_MODULE_AV2(name, reg, unreg, cl, hl, hfnlist, caplist, v, desc) \
+       struct mapi_mheader_av2 _mheader = { MAPI_V2, reg, unreg, cl, hl, hfnlist, caplist, v, desc, DATECODE}
 
 /* add a path */
 void mod_add_path(const char *path);
@@ -131,8 +131,8 @@ extern void load_all_modules(int warn);
 extern void load_core_modules(int);
 
 extern int unload_one_module(const char *, int);
-extern int load_one_module(const char *, int);
-extern int load_a_module(const char *, int, int);
+extern int load_one_module(const char *, int, int);
+extern int load_a_module(const char *, int, int, int);
 extern int findmodule_byname(const char *);
 extern void modules_init(void);