flag = 1;
needs_space = 0;
- if (!ShowChannel(sptr, chptr)) /* Don't list private channels unless we are on them. */
+ if (!ShowChannel(sptr, chptr)) { /* Don't list private channels unless we are on them. */
+ if (filter&NAMES_EON)
+ send_reply(sptr, RPL_ENDOFNAMES, chptr->chname);
return;
+ }
/* Iterate over all channel members, and build up the list. */