prevent bots from being added twice
[NeonServV5.git] / src / IRCParser.c
index 0f6c6922603ae15db0f3a71cb1551fca148b4417..25fda700044c47167d44c7e05817bae32a0ec7b6 100644 (file)
@@ -188,8 +188,10 @@ static IRC_CMD(raw_join) {
         event_registered(user, from);
         user->flags &= ~USERFLAG_WAS_REGISTERING;
     } else if(!(chan->flags & CHANFLAG_RECEIVED_USERLIST)) {
-        if(!isBot(user))
+        if(client->user != user) { //bots are allowed to add themselves
+            DESYNCHRONIZE(cache_sync);
             return 1; //ignore join
+        }
         
         chanuser = addChanUser(chan, user);
         chanuser->visCount = 1;