From c803edd8a82db12edba7d753504f95a9c1dff6f3 Mon Sep 17 00:00:00 2001 From: Deathmax Date: Wed, 30 May 2012 10:05:19 +0800 Subject: [PATCH] Remove redundant servername config options --- TShockAPI/ConfigFile.cs | 2 -- TShockAPI/Rest/RestManager.cs | 4 ++-- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/TShockAPI/ConfigFile.cs b/TShockAPI/ConfigFile.cs index 69c78720..6357bf26 100644 --- a/TShockAPI/ConfigFile.cs +++ b/TShockAPI/ConfigFile.cs @@ -132,8 +132,6 @@ namespace TShockAPI [Description("This will turn on a token requirement for the /status API endpoint.")] public bool EnableTokenEndpointAuthentication; - [Description("This is used when the API endpoint /status is queried.")] public string ServerNickname = "TShock Server"; - [Description("Enable/Disable the rest api.")] public bool RestApiEnabled; [Description("This is the port which the rest api will listen on.")] public int RestApiPort = 7878; diff --git a/TShockAPI/Rest/RestManager.cs b/TShockAPI/Rest/RestManager.cs index 3e303777..160dad55 100644 --- a/TShockAPI/Rest/RestManager.cs +++ b/TShockAPI/Rest/RestManager.cs @@ -126,7 +126,7 @@ namespace TShockAPI var activeplayers = Main.player.Where(p => null != p && p.active).ToList(); return new RestObject() { - {"name", TShock.Config.ServerNickname}, + {"name", TShock.Config.ServerName}, {"port", Convert.ToString(Netplay.serverPort)}, {"playercount", Convert.ToString(activeplayers.Count())}, {"players", string.Join(", ", activeplayers.Select(p => p.name))}, @@ -140,7 +140,7 @@ namespace TShockAPI var ret = new RestObject() { - {"name", TShock.Config.ServerNickname}, + {"name", TShock.Config.ServerName}, {"port", TShock.Config.ServerPort}, {"playercount", Main.player.Where(p => null != p && p.active).Count()}, {"maxplayers", TShock.Config.MaxSlots},