- if((chanuserflags & CHANUSERFLAG_INVISIBLE)) {
- if(!user) {
- user = createTempUser(argv[5]);
- user->flags |= USERFLAG_ISTMPUSER;
- }
+ if((chanuserflags & CHANUSERFLAG_INVISIBLE) && (!user || (user && !isBot(user)))) {
+ user = createTempUser(argv[5]); //always add a temponary user to prevent cache problems when the user joins right now (while it's stored in our cache as being invisible)
+ user->flags |= USERFLAG_ISTMPUSER;