//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);
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