fixed IRCParser.c: mark only bots as invisible when joining a +D channel
authorpk910 <philipp@zoelle1.de>
Sun, 5 Feb 2012 04:05:29 +0000 (05:05 +0100)
committerpk910 <philipp@zoelle1.de>
Sun, 5 Feb 2012 04:05:29 +0000 (05:05 +0100)
src/IRCParser.c

index 91b493822ada4d0e89ed042323a5d954ee7b370f..c4999828a6b0f889da575f8999e4e48be5e3e22b 100644 (file)
@@ -219,7 +219,7 @@ static IRC_CMD(raw_join) {
         putsock(client, "MODE %s +b", chan->name);
     } else if(!isUserOnChan(user, chan) && ((chan->flags & CHANFLAG_RECEIVED_USERLIST) || isBot(user))) {
         struct ChanUser *chanuser = addChanUser(chan, user);
-        if(isModeSet(chan->modes, 'D'))
+        if(isBot(user) && isModeSet(chan->modes, 'D')) //if the bot joins a channel it could also be invisible
             chanuser->flags |= CHANUSERFLAG_INVISIBLE;
         if(!noEvent) {
             if(wasRegistering)