} else
last_sock = sock;
}
+ event_freeclient(client);
free(client->host);
if(client->bind)
free(client->bind);
#define BIND_TYPE_FREEUSER 17
#define BIND_TYPE_FREECHAN 18
#define BIND_TYPE_RELOAD 19
+#define BIND_TYPE_FREECLIENT 20
-#define TOTAL_BIND_TYPES 20
+#define TOTAL_BIND_TYPES 21
void init_bind() {
if(binds)
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))
+
+FUNC_BIND(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT)
+FUNC_UNBIND(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT)
+FUNC_EVENT(freeclient, freeclient_func_t, BIND_TYPE_FREECLIENT, (struct ClientNode *client), (client))
int event_reload(int initialization);
#endif
+typedef void freeclient_func_t(struct ClientNode *client);
+#ifndef DND_FUNCTIONS
+/* MODULAR ACCESSIBLE */ int bind_freeclient(freeclient_func_t *func, int module_id);
+/* MODULAR ACCESSIBLE */ void unbind_freeclient(freeclient_func_t *func);
+int event_freeclient(struct ClientNode *chan);
+#endif
+
#endif
/* 191-193 */ #include "ModuleFunctions.h"
/* 194 */ /* bots.h */
/* 195-196 */ /* version.h */
+/* 197-198 */ /* IRCEvents.h */
#define Function void *
/* 193 */ (Function) module_neonbackup_recover_chan,
/* 194 */ (Function) requestInvite,
/* 195 */ (Function) is_stable_revision,
-/* 196 */ (Function) get_dev_revision
+/* 196 */ (Function) get_dev_revision,
+/* 197 */ (Function) bind_freeclient,
+/* 198 */ (Function) unbind_freeclient
};
static int module_id_counter = 1;
/* 194 */ #define requestInvite ((void (*)(struct UserNode *, struct ChanNode *))global[194])
/* 195 */ #define is_stable_revision ((const int (*)(void))global[195])
/* 196 */ #define get_dev_revision ((const char * (*)(void))global[196])
+/* 197 */ #define bind_freeclient ((int (*)(freeclient_func_t *, int))global[197])
+/* 198 */ #define unbind_freeclient ((void (*)(freeclient_func_t *))global[198])
#define MODULE_HEADER(initfunc,startfunc,stopfunc) \
void **global = NULL; \
#include "main.h"
-#define MODULE_VERSION 6
+#define MODULE_VERSION 7
#ifndef DND_FUNCTIONS
extern const char *compilation;