From a53c2f5c44d0ce0467e619bf483d987a6781eae2 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Mon, 20 Jan 2020 11:49:56 -0600 Subject: [PATCH] small change to detemine valid anticheat log lines fix new configuration generation bug as result of last pr --- Plugins/Stats/Plugin.cs | 2 +- SharedLibraryCore/Helpers/BaseConfigurationHandler.cs | 6 ++++++ 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/Plugins/Stats/Plugin.cs b/Plugins/Stats/Plugin.cs index 3cae668f0..bfb8de4b6 100644 --- a/Plugins/Stats/Plugin.cs +++ b/Plugins/Stats/Plugin.cs @@ -516,7 +516,7 @@ namespace IW4MAdmin.Plugins.Stats /// private bool ShouldIgnoreEvent(EFClient origin, EFClient target) { - return ((origin?.NetworkId <= 1 && target?.NetworkId <= 1) || (origin?.ClientId <= 1 && target?.ClientId <= 1)); + return ((origin?.NetworkId == 1 && target?.NetworkId == 1) || (origin?.ClientId <= 1 && target?.ClientId <= 1)); } /// diff --git a/SharedLibraryCore/Helpers/BaseConfigurationHandler.cs b/SharedLibraryCore/Helpers/BaseConfigurationHandler.cs index 90d726ba9..2fbff5699 100644 --- a/SharedLibraryCore/Helpers/BaseConfigurationHandler.cs +++ b/SharedLibraryCore/Helpers/BaseConfigurationHandler.cs @@ -25,6 +25,12 @@ namespace SharedLibraryCore.Configuration var configContent = File.ReadAllText(_configurationPath); _configuration = JsonConvert.DeserializeObject(configContent); } + + catch (FileNotFoundException) + { + _configuration = default; + } + catch (Exception e) { throw new ConfigurationException("MANAGER_CONFIGURATION_ERROR")