services: SVSHOLD nick reservation, SVSTOPIC, SVSOPER, SVSCMODE over s2s (+ stats S)

This commit is contained in:
Jean Chevronnet 2026-08-10 21:00:23 +00:00
parent f371ed0a18
commit b76fbfdb79
4 changed files with 166 additions and 6 deletions

View file

@ -243,13 +243,14 @@ impl Command for Stats {
s.numeric(uid, RPL_STATSOLINE, &format!("O * * {n} :oper"));
}
}
'k' | 'g' | 'z' | 'e' | 'q' | 's' => {
'k' | 'g' | 'z' | 'e' | 'q' | 's' | 'S' => {
let kind = match letter {
'k' => XKind::Kline,
'g' => XKind::Gline,
'z' => XKind::Zline,
'e' => XKind::Eline,
'q' => XKind::Qline,
'S' => XKind::Svshold,
_ => XKind::Shun,
};
let rows: Vec<String> = s

View file

@ -422,9 +422,9 @@ impl Command for Nick {
);
return CmdResult::Fail;
}
// Q-line: a reserved nick is refused (opers and services bypass)
// Q-line / SVSHOLD: a reserved nick is refused (opers and services bypass)
if !s.is_oper(uid) {
if let Some(reason) = s.matched_qline(newnick) {
if let Some(reason) = s.nick_reserved(newnick) {
s.numeric(
uid,
ERR_ERRONEUSNICKNAME,