struct UserNode *user = getUserByMask(from);
struct ChanNode *chan = getChanByName(argv[0]);
if(!chan && !(user->flags & USERFLAG_ISBOT)) return 0;
- if(chan && ((!isBot(user) && chan->chanbot != client->user) || (isBot(user) && client->user != user))) return 1; //we ignore it - but it's not a parse error
+ if(chan && (((!user || !isBot(user)) && chan->chanbot != client->user) || ((user && isBot(user)) && client->user != user))) return 1; //we ignore it - but it's not a parse error
//let Bots always add themselves! (maybe they join invisible)
if(user == NULL) {
user = addUserMask(from);