Remove redundant servername config options

This commit is contained in:
Deathmax 2012-05-30 10:05:19 +08:00
parent 55ae626131
commit c803edd8a8
2 changed files with 2 additions and 4 deletions

View file

@ -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;

View file

@ -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},