Merge branch 'development'
[NeonServV5.git] / src / modules / NeonServ.mod / event_neonserv_ctcp.c
index 11d03e25ae99285247b454daf3c8b14b45b93d8f..200b80f584a2170c92c467416b62f00b6a652b54 100644 (file)
@@ -1,4 +1,4 @@
-/* event_neonserv_ctcp.c - NeonServ v5.3
+/* event_neonserv_ctcp.c - NeonServ v5.6
  * Copyright (C) 2011-2012  Philipp Kreil (pk910)
  * 
  * This program is free software: you can redistribute it and/or modify
@@ -36,7 +36,7 @@ static void neonserv_event_chanctcp(struct UserNode *user, struct ChanNode *chan
     if(!(user->flags & USERFLAG_ISAUTHED)) {
         struct neonserv_event_ctcp_cache *cache = malloc(sizeof(*cache));
         if (!cache) {
-            perror("malloc() failed");
+            printf_log("neonserv", LOG_ERROR, "%s:%d malloc() failed", __FILE__, __LINE__);
             return;
         }
         cache->client = client;
@@ -44,7 +44,7 @@ static void neonserv_event_chanctcp(struct UserNode *user, struct ChanNode *chan
         cache->chan = chan;
         cache->command = strdup(command);
         cache->text = (text ? strdup(text) : NULL);
-        get_userauth(user, neonserv_event_ctcp_nick_lookup, cache);
+        get_userauth(user, module_id, neonserv_event_ctcp_nick_lookup, cache);
     } else
         neonserv_event_ctcp_async1(client, user, chan, command, text);
 }
@@ -98,7 +98,7 @@ static void neonserv_event_ctcp_async1(struct ClientSocket *client, struct UserN
                 char banidBuf[20];
                 sprintf(nameBuf, "ban_%d", banid);
                 sprintf(banidBuf, "%d", banid);
-                timeq_add_name(nameBuf, duration, channel_ban_timeout, strdup(banidBuf));
+                timeq_add_name(nameBuf, duration, module_id, channel_ban_timeout, strdup(banidBuf));
             case 1: //KICKBAN
                 if(!banmask)
                     banmask = generate_banmask(user, banmaskBuf);