whois: answer IDLE for pseudo-clients

This commit is contained in:
Jean Chevronnet 2026-07-16 23:22:35 +00:00
parent a60a6df19d
commit eaf3111917
4 changed files with 59 additions and 0 deletions

View file

@ -15,6 +15,10 @@ pub enum NetEvent {
Registered,
EndBurst,
Ping { token: String, from: Option<String> },
// A remote server asks for one of our pseudo-clients' idle/signon time — the
// idle half of a routed WHOIS (`WHOIS x x` / mIRC's double-click). Must be
// answered or that WHOIS produces no output at all.
Idle { requester: String, target: String },
Privmsg { from: String, to: String, text: String },
UserConnect { uid: String, nick: String, host: String, ip: String },
NickChange { uid: String, nick: String },
@ -66,6 +70,9 @@ pub enum NetAction {
Burst,
EndBurst,
Pong { token: String, from: Option<String> },
// Answer a remote IDLE request for one of our pseudo-clients so a routed
// WHOIS completes: `:<target> IDLE <requester> <signon> <idle>`.
IdleReply { target: String, requester: String, signon: u64, idle: u64 },
IntroduceUser { uid: String, nick: String, ident: String, host: String, gecos: String },
Privmsg { from: String, to: String, text: String },
Notice { from: String, to: String, text: String },