whox (354) + ircv3 standard-replies (fail/warn/note), account-tag, and +s/+p who/names member hiding
This commit is contained in:
parent
e736188378
commit
6d19b6771b
7 changed files with 233 additions and 53 deletions
|
|
@ -507,6 +507,19 @@ impl Server {
|
|||
self.numeric(uid, RPL_ENDOFNAMES, &format!("{key} :End of /NAMES list"));
|
||||
return;
|
||||
};
|
||||
// +s (secret) / +p (private): members are hidden from non-members. Reply as
|
||||
// if the channel were empty (opers still see it).
|
||||
if (ch.modes.secret || ch.modes.private)
|
||||
&& !ch.members.contains_key(&uid)
|
||||
&& !self.is_oper(uid)
|
||||
{
|
||||
self.numeric(
|
||||
uid,
|
||||
RPL_ENDOFNAMES,
|
||||
&format!("{} :End of /NAMES list", ch.name),
|
||||
);
|
||||
return;
|
||||
}
|
||||
// multi-prefix → all prefixes; userhost-in-names → full nick!user@host
|
||||
let (multi, uhost) = self
|
||||
.users
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue