Track login state and nick changes in NickServ
This commit is contained in:
parent
60fc687162
commit
65729a62b8
6 changed files with 150 additions and 5 deletions
|
|
@ -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>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ pub enum NetEvent {
|
|||
Ping { token: String, from: Option<String> },
|
||||
Privmsg { from: String, to: String, text: String },
|
||||
UserConnect { uid: String, nick: String },
|
||||
NickChange { uid: String, nick: String },
|
||||
Quit { uid: String },
|
||||
// An ircd relaying an IRCv3 account-registration request to us as the authority.
|
||||
AccountRequest { reqid: String, origin: String, kind: String, account: String, p2: String, p3: String },
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue