Add aide message functionality that uses the UT table to protect the user from an...
[citadel.git] / citadel / include / ctdl_module.h
index 15a03a521d5ac61793b1f9cfedd9d746643d9e20..0287daa7be280d459bbc76e9d7704ee0a5ab81d8 100644 (file)
 
 #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,