mirror of
https://git.muiegratis.online/suikoakari/Campofinale
synced 2025-12-15 19:14:36 +01:00
more server status info
This commit is contained in:
@@ -68,7 +68,7 @@ namespace Campofinale.Http
|
|||||||
[StaticRoute(HttpServerLite.HttpMethod.GET, "/serverStatus")]
|
[StaticRoute(HttpServerLite.HttpMethod.GET, "/serverStatus")]
|
||||||
public static async Task serverStatus(HttpContext ctx)
|
public static async Task serverStatus(HttpContext ctx)
|
||||||
{
|
{
|
||||||
string resp = "{\"maxPlayers\":" + Server.config.serverOptions.maxPlayers + ", \"players\":" + Server.clients.Count + ", \"status\":\"Online\"}";
|
string resp = "{\"maxPlayers\":" + Server.config.serverOptions.maxPlayers + ", \"players\":" + Server.clients.Count + ", \"status\":\"Online\", \"gameVersion\":" + GameConstants.GAME_VERSION + ", \"serverVersion\":" + Server.ServerVersion + "}";
|
||||||
|
|
||||||
ctx.Response.StatusCode = 200;
|
ctx.Response.StatusCode = 200;
|
||||||
ctx.Response.ContentLength = resp.Length;
|
ctx.Response.ContentLength = resp.Length;
|
||||||
|
|||||||
Reference in New Issue
Block a user