added new multi log system
[NeonServV5.git] / src / IRCEvents.c
index 972850249a9f2d71970bbe70922d553c9936b6c6..2eea34d8ecc1067bddf693e2a721b6a748abeee7 100644 (file)
@@ -21,6 +21,7 @@
 #include "ChanUser.h"
 #include "ClientSocket.h"
 #include "mysqlConn.h"
+#include "log.h"
 
 struct binding {
     void *func;
@@ -105,7 +106,7 @@ int bind_##NAME(FUNCTYPE *func, int module_id) { \
     if(!is_bound(TYPE, func)) { \
         struct binding *cbind = malloc(sizeof(*cbind)); \
         if (!cbind) { \
-            perror("malloc() failed"); \
+            printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__); \
             return 0; \
         } \
         cbind->func = func; \