fixed viscount update when another bot joins a channel
authorpk910 <philipp@zoelle1.de>
Sat, 1 Sep 2012 21:33:35 +0000 (23:33 +0200)
committerpk910 <philipp@zoelle1.de>
Sat, 1 Sep 2012 21:33:35 +0000 (23:33 +0200)
src/IRCParser.c

index f7ff777d877405dca80242be84124731e8f35495..1d53ec2aa1ba6c4e82e0d1a53a527ded07a56747 100644 (file)
@@ -187,7 +187,7 @@ static IRC_CMD(raw_join) {
         //join user to an existing channel
         chanuser = addChanUser(chan, user);
         chanuser->visCount = 1;
-        if(isBot(user)) {
+        if(isBot(user) && client->user == user) {
             if(isModeSet(chan->modes, 'D')) //if the bot joins a channel it could also be invisible
                 chanuser->flags |= CHANUSERFLAG_INVISIBLE;
             increase_viscount_butone(chan, chanuser);
@@ -210,7 +210,7 @@ static IRC_CMD(raw_join) {
         chanuser = getChanUser(user, chan);
         chanuser->visCount++;
         
-        if(isBot(user) && !(chanuser->flags & CHANUSERFLAG_INVISIBLE))
+        if(isBot(user) && client->user == user)
             increase_viscount_butone(chan, chanuser);
         
         //if multiple bots see the user, it can't be invisible