X-Git-Url: https://jfr.im/git/irc/quakenet/newserv.git/blobdiff_plain/550b82a274e0088c34bdcb866eb5515e455164db..21b22dceca9d89abfa607419c4289b9eacf84a2f:/core/error.h diff --git a/core/error.h b/core/error.h index 030c1bbd..ac15c425 100644 --- a/core/error.h +++ b/core/error.h @@ -47,6 +47,17 @@ struct error_event { char *source; }; -void Error(char *source, int severity, char *reason, ... ); +typedef void (*CoreHandlerFn)(void *arg); + +typedef struct corehandler { + void *arg; + CoreHandlerFn fn; + struct corehandler *prev, *next; +} corehandler; + +void Error(char *source, int severity, char *reason, ... ) __attribute__ ((format (printf, 3, 4))); + +corehandler *registercorehandler(CoreHandlerFn fn, void *arg); +void deregistercorehandler(corehandler *c); #endif