#include "ChanNode.h"
#include "ChanUser.h"
#include "ClientSocket.h"
+#include "mysqlConn.h"
struct binding {
void *func;
#define FUNC_EVENT(NAME,FUNCTYPE,TYPE,PDECLARATION,PLIST) \
int event_##NAME PDECLARATION { \
struct binding *cbind; \
+ pre_event(TYPE); \
for(cbind = binds[TYPE]; cbind; cbind = cbind->next) { \
FUNCTYPE *func = cbind->func; \
func PLIST; \
} \
+ post_event(TYPE); \
return 1; \
}
+void pre_event(UNUSED_ARG(int type)) {
+
+}
+
+void post_event(UNUSED_ARG(int type)) {
+ mysql_free();
+}
+
//EVENTS
FUNC_BIND(join, join_func_t, BIND_TYPE_JOIN)