X-Git-Url: https://code.citadel.org/?a=blobdiff_plain;f=citadel%2Finclude%2Fctdl_module.h;h=0287daa7be280d459bbc76e9d7704ee0a5ab81d8;hb=0b0f8a2280a8f22877baccd2355d7b41b863bfa0;hp=15a03a521d5ac61793b1f9cfedd9d746643d9e20;hpb=7bd1afdc579a40d094867fe1295841e1a2c48a06;p=citadel.git diff --git a/citadel/include/ctdl_module.h b/citadel/include/ctdl_module.h index 15a03a521..0287daa7b 100644 --- a/citadel/include/ctdl_module.h +++ b/citadel/include/ctdl_module.h @@ -72,12 +72,58 @@ #define CTDL_UPGRADE_CALL(module_name) ctdl_module_##module_name##_upgrade () -#define CtdlAideMessage(TEXT, SUBJECT) quickie_message("Citadel",NULL,NULL,AIDEROOM,TEXT,FMT_CITADEL,SUBJECT) +#define CtdlAideMessage(TEXT, SUBJECT) \ + quickie_message( \ + "Citadel", \ + NULL, \ + NULL, \ + AIDEROOM, \ + TEXT, \ + FMT_CITADEL, \ + SUBJECT) + + +#define CtdlAideFPMessage(TEXT, SUBJECT, N, STR, STRLEN) \ + flood_protect_quickie_message( \ + "Citadel", \ + NULL, \ + NULL, \ + AIDEROOM, \ + TEXT, \ + FMT_CITADEL, \ + SUBJECT, \ + N, \ + STR, \ + STRLEN) /* * Hook functions available to modules. */ - -void CtdlRegisterSessionHook(void (*fcn_ptr)(void), int EventType); +/* Priorities for */ +#define PRIO_QUEUE 500 +#define PRIO_AGGR 1000 +#define PRIO_SEND 1500 +#define PRIO_CLEANUP 2000 +/* Priorities for EVT_HOUSE */ +#define PRIO_HOUSE 3000 +/* Priorities for EVT_LOGIN */ +#define PRIO_CREATE 10000 +/* Priorities for EVT_LOGOUT */ +#define PRIO_LOGOUT 15000 +/* Priorities for EVT_LOGIN */ +#define PRIO_LOGIN 20000 +/* Priorities for EVT_START */ +#define PRIO_START 25000 +/* Priorities for EVT_STOP */ +#define PRIO_STOP 30000 +/* Priorities for EVT_ASYNC */ +#define PRIO_ASYNC 35000 +/* Priorities for EVT_SHUTDOWN */ +#define PRIO_SHUTDOWN 40000 +/* Priorities for EVT_UNSTEALTH */ +#define PRIO_UNSTEALTH 45000 +/* Priorities for EVT_STEALTH */ +#define PRIO_STEALTH 50000 +void CtdlRegisterSessionHook(void (*fcn_ptr)(void), int EventType, int Priority); void CtdlUnregisterSessionHook(void (*fcn_ptr)(void), int EventType); void CtdlShutdownServiceHooks(void); @@ -104,6 +150,9 @@ void CtdlUnregisterDeleteHook(void (*handler)(char *, long) ); void CtdlRegisterCleanupHook(void (*fcn_ptr)(void)); void CtdlUnregisterCleanupHook(void (*fcn_ptr)(void)); +void CtdlRegisterEVCleanupHook(void (*fcn_ptr)(void)); +void CtdlUnregisterEVCleanupHook(void (*fcn_ptr)(void)); + void CtdlRegisterProtoHook(void (*handler)(char *), char *cmd, char *desc); void CtdlRegisterServiceHook(int tcp_port,