whox (354) + ircv3 standard-replies (fail/warn/note), account-tag, and +s/+p who/names member hiding

This commit is contained in:
Jean Chevronnet 2026-08-08 17:55:44 +00:00
parent e736188378
commit 6d19b6771b
7 changed files with 233 additions and 53 deletions

View file

@ -39,17 +39,11 @@ impl Command for Knock {
}
let can = s.channels[&key].modes.invite_only && !s.is_member(uid, &key);
if !can {
let nick = s
.users
.get(&uid)
.map(|u| u.nick.clone())
.unwrap_or_default();
s.send(
s.fail(
uid,
format!(
":{} NOTICE {nick} :Can't KNOCK on {chan} (not invite-only, or you're on it)",
s.name
),
"KNOCK",
"CANNOT_KNOCK",
&format!("Can't KNOCK on {chan} (not invite-only, or you're on it)"),
);
return CmdResult::Fail;
}