- if (Ptr->IsModeSet('u'))
- {
- if (ShowOps)
- {
- /* Leave the names list alone, theyre an op
- * doing /names on the channel after joining it
- */
- if (Ptr->GetStatus(user) >= STATUS_OP)
- {
- nameslist = Ptr->GetUsers();
- return 0;
- }
-
- /* Show all the opped users */
- nl = *(Ptr->GetOppedUsers());
- nl[user] = user->nick;
- nameslist = &nl;
- return 0;
- }
- else
- {
- /* HELLOOO, IS ANYBODY THERE? -- nope, just us. */
- user->WriteServ("353 %s %c %s :%s", user->nick, Ptr->IsModeSet('s') ? '@' : Ptr->IsModeSet('p') ? '*' : '=', Ptr->name, user->nick);
- user->WriteServ("366 %s %s :End of /NAMES list.", user->nick, Ptr->name);
- return 1;
- }
- }
- return 0;
+ // If user is oper and operoverride is on, don't touch the list
+ if (OperCanSee && issuer->HasPrivPermission("channels/auspex"))
+ return true;
+
+ // You can always see yourself
+ if (issuer == memb->user)
+ return true;
+
+ // Can you see the list by permission?
+ ModResult res = ServerInstance->OnCheckExemption(issuer,memb->chan,"auditorium-see");
+ if (res.check(OpsCanSee && memb->chan->GetPrefixValue(issuer) >= OP_VALUE))
+ return true;
+
+ return false;