From 56d241b7416a5cf22e66e011614a4ef691c96934 Mon Sep 17 00:00:00 2001 From: Bitl Date: Tue, 31 Dec 2019 18:47:34 -0700 Subject: [PATCH] -nowebserver --- NovetusLauncher/NovetusCMD/LocalVars.cs | 1 + NovetusLauncher/NovetusCMD/Program.cs | 12 +++++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) diff --git a/NovetusLauncher/NovetusCMD/LocalVars.cs b/NovetusLauncher/NovetusCMD/LocalVars.cs index 51af91f..e65ee26 100644 --- a/NovetusLauncher/NovetusCMD/LocalVars.cs +++ b/NovetusLauncher/NovetusCMD/LocalVars.cs @@ -12,6 +12,7 @@ namespace NovetusCMD public static bool OverrideINI = false; public static bool RequestToOutputInfo = false; public static bool DebugMode = false; + public static bool NoWebServer = false; public static int ProcessID = 0; } } diff --git a/NovetusLauncher/NovetusCMD/Program.cs b/NovetusLauncher/NovetusCMD/Program.cs index 22eb70b..b61d6fd 100644 --- a/NovetusLauncher/NovetusCMD/Program.cs +++ b/NovetusLauncher/NovetusCMD/Program.cs @@ -210,6 +210,7 @@ namespace NovetusCMD ConsolePrint("-outputinfo | Outputs all information about the running server to a text file.", 4); ConsolePrint("-overrideconfig | Override the launcher settings.", 4); ConsolePrint("-debug | Disables launching of the server for debugging purposes.", 4); + ConsolePrint("-nowebserver | Disables launching of the web server.", 4); ConsolePrint("---------", 1); ConsolePrint("Custom server options", 3); ConsolePrint("-overrideconfig must be added in order for the below commands to function.", 5); @@ -280,6 +281,11 @@ namespace NovetusCMD LocalVars.DebugMode = true; } + if (CommandLine["nowebserver"] != null) + { + LocalVars.NoWebServer = true; + } + if (CommandLine["script"] != null) { GlobalVars.AddonScriptPath = CommandLine["script"].Replace(@"\", @"\\"); @@ -305,7 +311,11 @@ namespace NovetusCMD } InitUPnP(); - StartWebServer(); + + if (!LocalVars.NoWebServer) + { + StartWebServer(); + } AppDomain.CurrentDomain.ProcessExit += new EventHandler(ProgramClose);