Track login state and nick changes in NickServ

This commit is contained in:
Jean Chevronnet 2026-07-12 05:45:33 +00:00
parent 60fc687162
commit 65729a62b8
No known key found for this signature in database
6 changed files with 150 additions and 5 deletions

View file

@ -81,6 +81,15 @@ impl Protocol for InspIrcd {
_ => vec![],
}
}
// :<uid> NICK <newnick> <newts> — keep the sender's current nick
// fresh, so nick-based commands (IDENTIFY/REGISTER) act on who they
// are now, not their nick at burst time (e.g. after a guest rename).
"NICK" => match (source, tokens.next()) {
(Some(uid), Some(nick)) if !nick.is_empty() => {
vec![NetEvent::NickChange { uid, nick: nick.to_string() }]
}
_ => vec![],
},
"QUIT" => vec![NetEvent::Quit { uid: source.unwrap_or_default() }],
// account-registration relay from an ircd:
// ACCTREGISTER <reqid> <origin> <kind> <account> <p2> :<p3>