struct UserNode *target = getUserByNick(argv[1]);
struct ChanNode *chan = getChanByName(argv[0]);
if(chan == NULL || target == NULL) return 0;
- if(((!isBot(user) && chan->chanbot != client->user) || (isBot(user) && client->user != user))) return 1; //we ignore it - but it's not a parse error
+ if(((!isBot(target) && chan->chanbot != client->user) || (isBot(target) && client->user != target))) return 1; //we ignore it - but it's not a parse error
int keep_channel = 1;
if(isUserOnChan(target, chan) && (chan->flags & CHANFLAG_RECEIVED_USERLIST)) {
if(user == NULL) {