#define BIND_TYPE_REGISTERED 16
#define BIND_TYPE_FREEUSER 17
#define BIND_TYPE_FREECHAN 18
+#define BIND_TYPE_RELOAD 19
-#define TOTAL_BIND_TYPES 19
+#define TOTAL_BIND_TYPES 20
void init_bind() {
binds = calloc(TOTAL_BIND_TYPES, sizeof(*binds));
FUNC_BIND(freechan, freechan_func_t, BIND_TYPE_FREECHAN)
FUNC_UNBIND(freechan, freechan_func_t, BIND_TYPE_FREECHAN)
FUNC_EVENT(freechan, freechan_func_t, BIND_TYPE_FREECHAN, (struct ChanNode *chan), (chan))
+
+FUNC_BIND(reload, reload_func_t, BIND_TYPE_RELOAD)
+FUNC_UNBIND(reload, reload_func_t, BIND_TYPE_RELOAD)
+FUNC_EVENT(reload, reload_func_t, BIND_TYPE_RELOAD, (int initialization), (initialization))
\ No newline at end of file
int event_freechan(struct ChanNode *chan);
#endif
+typedef int reload_func_t(int initialization);
+#ifndef DND_FUNCTIONS
+/* MODULAR ACCESSIBLE */ int bind_reload(reload_func_t *func, int module_id);
+/* MODULAR ACCESSIBLE */ void unbind_reload(reload_func_t *func);
+int event_reload(int initialization);
+#endif
+
#endif
fprintf(stderr, "Unable to load " CONF_FILE "\n");
exit(0);
}
+ event_reload(1);
#if HAVE_THREADS
THREAD_MUTEX_INIT(log_sync);
#endif
void reload_config() {
loadConfig(CONF_FILE);
+ event_reload(0);
}
static int getCurrentSecondsOfDay() {
/* 054 */ (Function) unbind_nick,
/* 055 */ (Function) bind_part,
/* 056 */ (Function) unbind_part,
-/* 057 */ (Function) NULL, /* deprecated */
-/* 058 */ (Function) NULL, /* deprecated */
+/* 057 */ (Function) bind_reload,
+/* 058 */ (Function) unbind_reload,
/* 059 */ (Function) bind_kick,
/* 060 */ (Function) unbind_kick,
/* 061 */ (Function) bind_topic,
/* 054 */ #define unbind_nick ((void (*)(nick_func_t *))global[54])
/* 055 */ #define bind_part ((int (*)(part_func_t *, int))global[55])
/* 056 */ #define unbind_part ((void (*)(part_func_t *))global[56])
-/* 057 */ /* deprecated */
-/* 058 */ /* deprecated */
+/* 057 */ #define bind_reload ((int (*)(reload_func_t *, int))global[57])
+/* 058 */ #define unbind_reload ((void (*)(reload_func_t *))global[58])
/* 059 */ #define bind_kick ((int (*)(kick_func_t *, int))global[59])
/* 060 */ #define unbind_kick ((void (*)(kick_func_t *))global[60])
/* 061 */ #define bind_topic ((int (*)(topic_func_t *, int))global[61])
#include "main.h"
-#define MODULE_VERSION 5
+#define MODULE_VERSION 6
#ifndef DND_FUNCTIONS
extern const char *compilation;