Files
NomadsReach 16c101a4bc 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.
2026-08-16 18:22:03 -04:00

14 lines
482 B
C#

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}";
}