Merge branch 'development'
[NeonServV5.git] / src / ChanUser.c
index 24bdaf8fd0c6991573ea07e7fc3f2af9f6c4b4ca..e18ce4dd57590d7a718f13cebfda8edfadd02243 100644 (file)
@@ -1,4 +1,4 @@
-/* ChanUser.c - NeonServ v5.5
+/* ChanUser.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
 #include "ChanNode.h"
 #include "ModeNode.h"
 #include "UserNode.h"
+#include "log.h"
 
 struct ChanUser* addChanUser(struct ChanNode *chan, struct UserNode *user) {
     struct ChanUser *chanuser = malloc(sizeof(*chanuser));
     if (!chanuser)
     {
-        perror("malloc() failed");
+        printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return NULL;
     }
     chanuser->flags = 0;
@@ -53,7 +54,7 @@ struct ChanUser* addInvisibleChanUser(struct ChanNode *chan, struct UserNode *us
     struct ChanUser *chanuser = malloc(sizeof(*chanuser));
     if (!chanuser)
     {
-        perror("malloc() failed");
+        printf_log("main", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return NULL;
     }
     chanuser->flags = CHANUSERFLAG_INVISIBLE;