added new multi log system
[NeonServV5.git] / src / ModeNode.c
index 8cc5b67a07328f6f055060bc2f5105f5b009a9db..f3579cd42b71654ae34d168eddec03bf6393b5c8 100644 (file)
@@ -19,6 +19,7 @@
 #include "ChanUser.h"
 #include "UserNode.h"
 #include "BanNode.h"
+#include "log.h"
 
 static int modes_with_strarg, modes_with_intarg, modes_count;
 
@@ -77,7 +78,7 @@ struct ModeNode *createModeNode(struct ChanNode *chan) {
     struct ModeNode *modes = malloc(sizeof(*modes));
     if (!modes)
     {
-        perror("malloc() failed");
+        printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return NULL;
     }
     modes->chan = chan;