-
Notifications
You must be signed in to change notification settings - Fork 0
Host Role / Admin Controls #228
Copy link
Copy link
Closed
Labels
networkNetworking, communication, or protocol-related tasks.Networking, communication, or protocol-related tasks.serverIssues related to the server-side implementation.Issues related to the server-side implementation.
Metadata
Metadata
Assignees
Labels
networkNetworking, communication, or protocol-related tasks.Networking, communication, or protocol-related tasks.serverIssues related to the server-side implementation.Issues related to the server-side implementation.
Type
Fields
Give feedbackNo fields configured for issues without a type.
Implement a text-mode administration dashboard for the dedicated server, running in a separate thread and reading commands from stdin. This console must allow server operators to manage live sessions and game instances without a GUI.
Scope / Requirements:
Add an interactive admin CLI available in the server terminal.
Supported commands:
help
status (global overview: rooms/sessions/bans)
rooms (list active rooms/instances)
sessions (list connected sessions with tcp/udp endpoints, auth state, username, roomId)
kick (disconnect a player and remove session)
ban [minutes] (ban the player’s IP and kick; default = 24h)
banip [minutes] (ban by IP and kick any matching sessions; default = 24h)
unban
bans (list banned IPs with remaining duration)
shutdown (gracefully stop server runtime)
Add an IP ban system:
Store banned IPs with expiration time.
Enforce bans at TCP session creation and UDP packet handling (drop packets from banned IPs).
Provide APIs on SessionManager: banIp, unbanIp, isIpBanned, listBans.
Integration points:
Start/stop the admin console from ServerRuntime.
Ensure banned clients receive a clear refusal on TCP (e.g., BANNED / 403-style response) and are ignored on UDP.
Concurrency:
Admin thread must not block networking threads.
Access to session/ban data must be thread-safe.