struct binding *next;
};
-static void **binds;
+static void **binds = NULL;
#define BIND_TYPE_JOIN 0
#define BIND_TYPE_NICK 1
#define BIND_TYPE_PART 2
#define TOTAL_BIND_TYPES 20
void init_bind() {
+ if(binds)
+ return;
binds = calloc(TOTAL_BIND_TYPES, sizeof(*binds));
}
}
}
free(binds);
+ binds = NULL;
}
void unregister_module_events(int module_id) {
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
+FUNC_EVENT(reload, reload_func_t, BIND_TYPE_RELOAD, (int initialization), (initialization))