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.
14 lines
482 B
C#
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}";
|
|
}
|