+/*
+ * DeleteFunctionHook extensions are used for hooks which get called when a
+ * message is about to be deleted.
+ */
+typedef struct DeleteFunctionHook DeleteFunctionHook;
+struct DeleteFunctionHook {
+ DeleteFunctionHook *next;
+ void (*h_function_pointer) (char *target_room, long msgnum);
+};
+extern DeleteFunctionHook *DeleteHookTable;
+
+
+/*
+ * ExpressMessageFunctionHook extensions are used for hooks which implement
+ * the sending of an instant message through various channels. Any function
+ * registered should return the number of recipients to whom the message was
+ * successfully transmitted.
+ */
+typedef struct XmsgFunctionHook XmsgFunctionHook;
+struct XmsgFunctionHook {
+ XmsgFunctionHook *next;
+ int (*h_function_pointer) (char *, char *, char *, char *);
+ int order;
+};
+extern XmsgFunctionHook *XmsgHookTable;
+
+
+
+
+/*
+ * RoomFunctionHook extensions are used for hooks which impliment room
+ * processing functions when new messages are added EG. SIEVE.
+ */
+typedef struct RoomFunctionHook RoomFunctionHook;
+struct RoomFunctionHook {
+ RoomFunctionHook *next;
+ int (*fcn_ptr) (struct ctdlroom *);
+};
+extern RoomFunctionHook *RoomHookTable;
+
+
+
+typedef struct SearchFunctionHook SearchFunctionHook;
+struct SearchFunctionHook {
+ SearchFunctionHook *next;
+ void (*fcn_ptr) (int *, long **, const char *);
+ char *name;
+};
+extern SearchFunctionHook *SearchFunctionHookTable;
+
+
+CleanupFunctionHook *CleanupHookTable = NULL;
+CleanupFunctionHook *EVCleanupHookTable = NULL;
+SessionFunctionHook *SessionHookTable = NULL;
+UserFunctionHook *UserHookTable = NULL;
+XmsgFunctionHook *XmsgHookTable = NULL;
+MessageFunctionHook *MessageHookTable = NULL;
+NetprocFunctionHook *NetprocHookTable = NULL;
+DeleteFunctionHook *DeleteHookTable = NULL;
+ServiceFunctionHook *ServiceHookTable = NULL;
+FixedOutputHook *FixedOutputTable = NULL;
+RoomFunctionHook *RoomHookTable = NULL;
+SearchFunctionHook *SearchFunctionHookTable = NULL;
+
+typedef struct ProtoFunctionHook ProtoFunctionHook;
+struct ProtoFunctionHook {
+ void (*handler) (char *cmdbuf);
+ const char *cmd;
+ const char *desc;
+};
+
+HashList *ProtoHookList = NULL;
+
+
+#define ERR_PORT (1 << 1)
+
+
+static StrBuf *portlist = NULL;
+
+static StrBuf *errormessages = NULL;
+
+
+long DetailErrorFlags;
+ConstStr Empty = {HKEY("")};
+char *ErrSubject = "Startup Problems";
+ConstStr ErrGeneral[] = {
+ {HKEY("Citadel had trouble on starting up. ")},
+ {HKEY(" This means, citadel won't be the service provider for a specific service you configured it to.\n\n"
+ "If you don't want citadel to provide these services, turn them off in WebCit via: ")},
+ {HKEY("To make both ways actualy take place restart the citserver with \"sendcommand down\"\n\n"
+ "The errors returned by the system were:\n")},
+ {HKEY("You can recheck the above if you follow this faq item:\n"
+ "http://www.citadel.org/doku.php?id=faq:mastering_your_os:net#netstat")}
+};
+
+ConstStr ErrPortShort = { HKEY("We couldn't bind all ports you configured to be provided by citadel server.\n")};
+ConstStr ErrPortWhere = { HKEY("\"Admin->System Preferences->Network\".\n\nThe failed ports and sockets are: ")};
+ConstStr ErrPortHint = { HKEY("If you want citadel to provide you with that functionality, "
+ "check the output of \"netstat -lnp\" on linux Servers or \"netstat -na\" on *BSD"
+ " and stop the program that binds these ports.\n You should eventually remove "
+ " their initscripts in /etc/init.d so that you won't get this trouble once more.\n"
+ " After that goto \"Administration -> Shutdown Citadel\" to make Citadel restart & retry to bind this port.\n")};