Answer WHOIS IDLE for our pseudo-clients
All checks were successful
CI / check (push) Successful in 3m54s

A two-parameter WHOIS (/whois x x — what mIRC sends when you double-click a nick,
to fetch idle time) routes the query to the target's server. For a service that
server is echo, which was dropping the resulting IDLE request as an unknown
command, so the WHOIS produced no output at all: InspIRCd only emits the whois
numerics once the IDLE reply arrives (m_spanningtree/idle.cpp), so no reply meant
total silence.

Handle the inbound IDLE request and answer it for our own services and bots:
":<target> IDLE <requester> <signon> <idle>", signon = burst time, idle 0 (a
pseudo-client is always active). A routed WHOIS of NickServ/ChanServ/etc. now
completes.
This commit is contained in:
Jean Chevronnet 2026-07-16 23:22:35 +00:00
parent 4e12531815
commit 3f11f77a81
No known key found for this signature in database
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 },