From 6f28bc5b0b41b7e70fa14c1525b3f53263b23b04 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sun, 11 Jun 2023 17:30:06 -0500 Subject: [PATCH] fix issue with CS:GO connector --- Application/Extensions/StartupExtensions.cs | 4 ++-- Integrations/Source/SourceRConConnection.cs | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/Extensions/StartupExtensions.cs b/Application/Extensions/StartupExtensions.cs index ff4498ee2..be6acabe1 100644 --- a/Application/Extensions/StartupExtensions.cs +++ b/Application/Extensions/StartupExtensions.cs @@ -48,8 +48,8 @@ namespace IW4MAdmin.Application.Extensions loggerConfig = loggerConfig.WriteTo.Console( outputTemplate: "[{Timestamp:HH:mm:ss} {Server} {Level:u3}] {Message:lj}{NewLine}{Exception}") - ; //.MinimumLevel.Override("Microsoft", LogEventLevel.Information) - //.MinimumLevel.Debug(); + .MinimumLevel.Override("Microsoft", LogEventLevel.Information) + .MinimumLevel.Debug(); } _defaultLogger = loggerConfig.CreateLogger(); diff --git a/Integrations/Source/SourceRConConnection.cs b/Integrations/Source/SourceRConConnection.cs index 623d80e81..10233959b 100644 --- a/Integrations/Source/SourceRConConnection.cs +++ b/Integrations/Source/SourceRConConnection.cs @@ -104,7 +104,7 @@ namespace Integrations.Source } var split = response.TrimEnd('\n').Split('\n'); - return split.Take(split.Length - 1).ToArray(); + return split.Take(Math.Max(1, split.Length - 1)).ToArray(); } catch (TaskCanceledException)