From 70e8bb9759c01530dc672cc50d2f1e6e1fb4964e Mon Sep 17 00:00:00 2001 From: Lucas Nicodemus Date: Sat, 4 Feb 2012 20:14:34 -0700 Subject: [PATCH] Added -rest-enabled, which will define if the REST API is enabled from command line. --- TShockAPI/TShock.cs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/TShockAPI/TShock.cs b/TShockAPI/TShock.cs index 2eefb04f..1e6326c5 100644 --- a/TShockAPI/TShock.cs +++ b/TShockAPI/TShock.cs @@ -372,6 +372,10 @@ namespace TShockAPI string token = Convert.ToString(parms[++i]); RESTStartupTokens.Add(token, "null"); } + if (parms[i].ToLower() == "-rest-enabled") + { + Config.RestApiEnabled = Convert.ToBoolean(parms[++i]); + } } }