-#define DECLARE_MODULE_AV1(name,reg,unreg,cl,hl,hfnlist, v) \
+#define MAPI_ORIGIN_UNKNOWN 0 /* Unknown provenance (AV1 etc.) */
+#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_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. */
+ mapi_hlist_av1 *mapi_hook_list; /* List of hooks to add. */
+ mapi_hfn_list_av1 *mapi_hfn_list; /* List of hook_add_hook's to do */
+ 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) \