callback(bot, chan, data);
}
-void get_userlist_with_invisible(struct ChanNode *chan, userlist_callback_t callback, void *data) {
+void _get_userlist_with_invisible(struct ChanNode *chan, userlist_callback_t callback, void *data, int force) {
struct ClientSocket *bot;
for(bot = getBots(SOCKET_FLAG_READY, NULL); bot; bot = getBots(SOCKET_FLAG_READY, bot)) {
if(isUserOnChan(bot->user, chan))
//check if we really need to who the channel
//invisible users can only be present if chanmode +D or +d is set!
int do_who = (!(chan->flags & CHANFLAG_RECEIVED_USERLIST)) || (isModeSet(chan->modes, 'd') || isModeSet(chan->modes, 'D'));
- if(!do_who) {
+ if(!do_who && force) {
struct ChanUser *chanuser;
for(chanuser = getChannelUsers(chan, NULL); chanuser; chanuser = getChannelUsers(chan, chanuser)) {
if(!(chanuser->user->flags & (USERFLAG_ISAUTHED | USERFLAG_ISIRCOP | USERFLAG_ISBOT)) && (time(0) - chanuser->user->last_who) > REWHO_TIMEOUT) {