From ba77e0149c496a5cdc087c8561b14af3b7de29ec Mon Sep 17 00:00:00 2001 From: RaidMax Date: Wed, 3 Jun 2020 19:45:06 -0500 Subject: [PATCH] disable standard console in if it has been redirected --- Application/Main.cs | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/Application/Main.cs b/Application/Main.cs index 0b1a1b7f8..919a99c8f 100644 --- a/Application/Main.cs +++ b/Application/Main.cs @@ -231,6 +231,12 @@ namespace IW4MAdmin.Application /// private static async Task ReadConsoleInput() { + if (Console.IsInputRedirected) + { + ServerManager.Logger.WriteInfo("Disabling console input as it has been redirected"); + return; + } + string lastCommand; var Origin = Utilities.IW4MAdminClient(ServerManager.Servers[0]);