Add client and server connection-info windows

Sends raw getconnectioninfo/serverrequestconnectioninfo commands and
reads the reply out of tsclientlib's bookkeeping state (it already
tracks ping, packet loss, bytes/packets sent+received internally -
just needed to be requested and surfaced). Wired into the client
context menu (any client), the Selbst menu (self), and a new link in
the server info panel.

Uses send_with_result() so a permission-denied rejection surfaces as
a visible error instead of silently doing nothing; the dialogs also
fall back to a "no response" message after 6s in case the server
declines without any reply at all (observed against a real server
where a guest lacked b_virtualserver_connectioninfo_view).

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
This commit is contained in:
MoepchiandClaude Sonnet 5 committed 2026-08-04 22:42:23 +02:00
1 parent a300daedeb
commit 74f688aba8
7 files changed
+565 -3

No files matched your search

+8
View File
@@ -122,6 +122,14 @@ wss.on("connection", (socket: WebSocket) => {
await connection?.setWhisperTargets(msg.channelIds ?? [], msg.clientIds ?? []);
break;
}
case "getClientConnectionInfo": {
await connection?.getClientConnectionInfo(msg.clientId);
break;
}
case "getServerConnectionInfo": {
await connection?.getServerConnectionInfo();
break;
}
case "disconnect": {
await connection?.disconnect(msg.message ?? "");
break;