added MODE_AUDITORIUM (+u) to show only ops the full userlist
[ircu2.10.12-pk.git] / ircd / m_names.c
index 16cee5cac1b624879891b32d2d57277bbeb33c44..41a48c7f207cc00c69fc51304e65ae2fff98a3eb 100644 (file)
  *  NAMES_DEL - Show join-delayed names list.
  *  NAMES_EON - When OR'd with the other two, adds an 'End of Names' numeric
  *              used by m_join
+ *  NAMES_OPS - Only list oped (+o) or voiced (+v) users
  *
  */
 
@@ -165,6 +166,9 @@ void do_names(struct Client* sptr, struct Channel* chptr, int filter)
                
        if (IsInvisibleJoin(member) && member->user != sptr)
                continue;
+       
+       if (!IsChanOp(member) && !HasVoice(member) && member->user != sptr && (filter & NAMES_OPS))
+               continue;
 
     if (needs_space)
       buf[idx++] = ' ';