do_names(sptr, chptrb, NAMES_ALL|NAMES_EON);
}
} else {
+ if(find_member_link(chptrb, sptr))
+ continue; //we have already joined this channel
//first of all check if we may even join this channel
int err2 = 0;
if (chptrb->users == 0 && !chptrb->mode.apass[0] && !(chptrb->mode.mode & MODE_PERSIST)) {
send_reply(sptr, RPL_TOPIC, chptrb->chname, chptrb->topic);
send_reply(sptr, RPL_TOPICWHOTIME, chptrb->chname, chptrb->topic_nick, chptrb->topic_time);
}
- do_names(sptr, chptrb, NAMES_ALL|NAMES_EON); /* send /names list */
+ do_names(sptr, chptrb, NAMES_ALL|NAMES_EON|(((chptrb->mode.mode & MODE_AUDITORIUM) && !(flags & CHFL_CHANOP)) ? NAMES_OPS : 0)); /* send /names list */
}
}
}