fixed multiple added bots (WHO asyncs)
authorpk910 <philipp@zoelle1.de>
Fri, 7 Sep 2012 17:14:08 +0000 (19:14 +0200)
committerpk910 <philipp@zoelle1.de>
Fri, 7 Sep 2012 17:14:08 +0000 (19:14 +0200)
src/IRCParser.c

index 675dc40ae7d7d6b3a0a6f129c2e524e6bf12e2db..bf7755142b7f9f7049a4a77fba4ce41b950dc7dd 100644 (file)
@@ -340,8 +340,10 @@ static IRC_CMD(raw_join) {
             return 1; //ignore join
         }
         
-        chanuser = addChanUser(chan, user);
-        chanuser->visCount = 1;
+        if(!(chanuser = getChanUser(user, chan))) {
+            chanuser = addChanUser(chan, user);
+        }
+        chanuser->visCount++;
         chan->botcount++;
         
         if(isModeSet(chan->modes, 'D')) //if the bot joins a channel it could also be invisible