x-lines: eline (ban exempt), shun (drop commands), qline (reserved nicks)

This commit is contained in:
Jean Chevronnet 2026-08-08 20:16:05 +00:00
parent d211621a59
commit eb7f9f25c4
No known key found for this signature in database
GPG key ID: 439666D63A9477E4
4 changed files with 139 additions and 13 deletions

View file

@ -350,6 +350,17 @@ impl Command for Nick {
);
return CmdResult::Fail;
}
// Q-line: a reserved nick is refused (opers and services bypass)
if !s.is_oper(uid) {
if let Some(reason) = s.matched_qline(newnick) {
s.numeric(
uid,
ERR_ERRONEUSNICKNAME,
&format!("{newnick} :Nickname is reserved: {reason}"),
);
return CmdResult::Fail;
}
}
if let Some(other) = s.find_nick(newnick) {
if other != uid {
s.numeric(