From ccee8f3ff4ab2bd959397ce2831cdf6bdad39e51 Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 4 Feb 2012 21:22:55 -0700 Subject: [PATCH] Add some debug output so people know why REST is magically enabled. --- TShockAPI/Properties/AssemblyInfo.cs | 4 ++-- TShockAPI/TShock.cs | 7 ++++++- 2 files changed, 8 insertions(+), 3 deletions(-) diff --git a/TShockAPI/Properties/AssemblyInfo.cs b/TShockAPI/Properties/AssemblyInfo.cs index 857627ed..ee585f2f 100644 --- a/TShockAPI/Properties/AssemblyInfo.cs +++ b/TShockAPI/Properties/AssemblyInfo.cs @@ -48,5 +48,5 @@ using System.Runtime.InteropServices; // Build Number // MMdd of the build -[assembly: AssemblyVersion("3.6.0.0126")] -[assembly: AssemblyFileVersion("3.6.0.0126")] +[assembly: AssemblyVersion("3.6.0.0204")] +[assembly: AssemblyFileVersion("3.6.0.0204")] diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 669ecf63..30bf13f6 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -371,14 +371,19 @@ namespace TShockAPI { string token = Convert.ToString(parms[++i]); RESTStartupTokens.Add(token, "null"); + Console.WriteLine("Startup parameter overrode REST token."); } if (parms[i].ToLower() == "-rest-enabled") { - Config.RestApiEnabled = Convert.ToBoolean(parms[++i]); + Config.RestApiEnabled = true; + Console.WriteLine("Startup parameter overrode REST enable."); + } if (parms[i].ToLower() == "-rest-port") { Config.RestApiPort = Convert.ToInt32(parms[++i]); + Console.WriteLine("Startup parameter overrode REST port."); + } } }