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:
@@ -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}";
|
||||
}
|
||||
Reference in New Issue
Block a user