calls exit for ERR_STOP events.
This allows modules to take any emergency action they can before the service
dies.
#include <stdarg.h>
#include <time.h>
#include <stdio.h>
+#include <stdlib.h>
#include "error.h"
+#include "hooks.h"
char *sevtostring(int severity) {
switch(severity) {
if (severity>=ERR_STOP) {
fprintf(stderr,"Terminal error occured, exiting...\n");
+ triggerhook(HOOK_CORE_STOPERROR, NULL);
exit(0);
}
}
#define HOOK_CORE_STATSREQUEST 1
#define HOOK_CORE_STATSREPLY 2
#define HOOK_CORE_ENDOFHOOKSQUEUE 3
+#define HOOK_CORE_STOPERROR 4
#define HOOK_IRC_CONNECTED 100
#define HOOK_IRC_DISCON 101