]> jfr.im git - solanum.git/blobdiff - include/modules.h
Keep propagated bans in a dictionary, not a list
[solanum.git] / include / modules.h
index bfc502f11b85287c9ef390c129d00a452ee71c77..41d0f65835ff561f6398a4dd34ddd3d3935567a1 100644 (file)
@@ -28,8 +28,9 @@
 #include "defaults.h"
 #include "setup.h"
 #include "parse.h"
+#include "client.h" /* for IDLEN */
 
-#define MAPI_CHARYBDIS 2
+#define MAPI_SOLANUM 2
 
 #include <ltdl.h>
 
@@ -44,6 +45,7 @@ struct module
        lt_dlhandle address;
        int core;       /* This is int for backwards compat reasons */
        int origin;     /* Ditto */
+       char *path;
        int mapi_version;
        void *mapi_header; /* actually struct mapi_mheader_av<mapi_version> */
        rb_dlink_node node;
@@ -69,9 +71,9 @@ typedef struct
 {
        const char *hapi_name;
        hookfn fn;
+       enum hook_priority priority;
 } mapi_hfn_list_av1;
 
-
 #define MAPI_CAP_CLIENT                1
 #define MAPI_CAP_SERVER                2
 
@@ -95,8 +97,8 @@ struct mapi_mheader_av1
 };
 
 #define MAPI_ORIGIN_UNKNOWN    0               /* Unknown provenance (AV1 etc.) */
-#define MAPI_ORIGIN_EXTENSION  1               /* Charybdis extension */
-#define MAPI_ORIGIN_CORE       2               /* Charybdis core module */
+#define MAPI_ORIGIN_EXTENSION  1               /* Solanum extension */
+#define MAPI_ORIGIN_CORE       2               /* Solanum core module */
 
 struct mapi_mheader_av2
 {
@@ -118,6 +120,12 @@ struct mapi_mheader_av2
 #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}
 
+struct modreload
+{
+       char module[BUFSIZE];
+       char id[IDLEN];
+};
+
 /* add a path */
 void mod_add_path(const char *path);
 void mod_clear_paths(void);