added new multi log system
[NeonServV5.git] / src / modules / NeonSpam.mod / bot_NeonSpam.c
index d261b790dd13542319104af63f6c63922db43187..dd2e4d1043fc722ecdabd593808150fba2fda330 100644 (file)
@@ -225,7 +225,7 @@ int loadNeonSpamSettings(struct ChanNode *chan) {
     if(chan->spam_settings) return 0;
     struct NeonSpamSettings *settings = malloc(sizeof(*settings));
     if(!settings) {
-        perror("malloc() failed");
+        printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return 0;
     }
     MYSQL_RES *res;
@@ -321,7 +321,7 @@ static struct NeonSpamJoinNode *getNeonSpamJoinNode(struct ChanUser *chanuser) {
         return result;
     joinnode = malloc(sizeof(*joinnode));
     if(!joinnode) {
-        perror("malloc() failed");
+        printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return NULL;
     }
     joinnode->ident = strdup(chanuser->user->ident);
@@ -336,7 +336,7 @@ static struct NeonSpamJoinNode *getNeonSpamJoinNode(struct ChanUser *chanuser) {
 static void createSpamNode(struct ChanUser *chanuser) {
     struct NeonSpamNode *spamnode = malloc(sizeof(*spamnode));
     if(!spamnode) {
-        perror("malloc() failed");
+        printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
         return;
     }
     spamnode->lastmsg = 0;