Launcher milestone 2: player list, kick/ban, live stats

Adds an admin-protocol client (token-authed TCP JSON on 127.0.0.1:AdminPort,
reusing the server's .admin-token) that polls connected players and status
every 3s, plus Kick/Ban on the selected player and a players/uptime readout.
This commit is contained in:
NomadsReach
2026-08-16 18:22:03 -04:00
parent 1f01e68794
commit 16c101a4bc
4 changed files with 276 additions and 19 deletions
+13
View File
@@ -0,0 +1,13 @@
namespace CommonwealthOnline.Host.ViewModels;
public sealed class PlayerRow
{
public uint PlayerId { get; init; }
public string Label { get; init; } = string.Empty;
public string Address { get; init; } = string.Empty;
public long PacketsReceived { get; init; }
public long PacketsSent { get; init; }
public string Display =>
$"#{PlayerId} {(string.IsNullOrEmpty(Label) ? "player" : Label)} {Address} ↓{PacketsReceived} ↑{PacketsSent}";
}