From 451072276dd90c41a4c5b18a707dafee7984a00e Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sun, 26 Jan 2020 14:08:53 -0600 Subject: [PATCH 1/2] fix nuget package version for scriptcommands fix only one server being added during setup --- Application/ApplicationManager.cs | 2 +- Plugins/IW4ScriptCommands/GscApiController.cs | 2 +- Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) diff --git a/Application/ApplicationManager.cs b/Application/ApplicationManager.cs index f16218461..7847871db 100644 --- a/Application/ApplicationManager.cs +++ b/Application/ApplicationManager.cs @@ -293,7 +293,7 @@ namespace IW4MAdmin.Application serverConfig.AddEventParser(parser); } - newConfig.Servers[0] = (ServerConfiguration)serverConfig.Generate(); + newConfig.Servers = newConfig.Servers.Append((ServerConfiguration)serverConfig.Generate()).ToArray(); } while (Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["SETUP_SERVER_SAVE"])); config = newConfig; diff --git a/Plugins/IW4ScriptCommands/GscApiController.cs b/Plugins/IW4ScriptCommands/GscApiController.cs index 2642b68cb..9a846f83c 100644 --- a/Plugins/IW4ScriptCommands/GscApiController.cs +++ b/Plugins/IW4ScriptCommands/GscApiController.cs @@ -23,7 +23,7 @@ namespace WebfrontCore.Controllers.API public IActionResult ClientInfo(string networkId) { var clientInfo = Manager.GetActiveClients() - .FirstOrDefault(c => c.NetworkId == networkId.ConvertGuidToLong()); + .FirstOrDefault(c => c.NetworkId == networkId.ConvertGuidToLong(System.Globalization.NumberStyles.HexNumber)); if (clientInfo != null) { diff --git a/Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj b/Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj index 5597b8497..d74ab014d 100644 --- a/Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj +++ b/Plugins/IW4ScriptCommands/IW4ScriptCommands.csproj @@ -10,7 +10,7 @@ - + From 1fd31beb0542b6d66bc53d1c1abf63ce9675e5ec Mon Sep 17 00:00:00 2001 From: RaidMax Date: Sun, 26 Jan 2020 15:40:00 -0600 Subject: [PATCH 2/2] fix another meme --- Application/ApplicationManager.cs | 2 +- SharedLibraryCore/Configuration/ServerConfiguration.cs | 3 --- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/Application/ApplicationManager.cs b/Application/ApplicationManager.cs index 7847871db..86f39c9f1 100644 --- a/Application/ApplicationManager.cs +++ b/Application/ApplicationManager.cs @@ -293,7 +293,7 @@ namespace IW4MAdmin.Application serverConfig.AddEventParser(parser); } - newConfig.Servers = newConfig.Servers.Append((ServerConfiguration)serverConfig.Generate()).ToArray(); + newConfig.Servers = newConfig.Servers.Where(_servers => _servers != null).Append((ServerConfiguration)serverConfig.Generate()).ToArray(); } while (Utilities.PromptBool(Utilities.CurrentLocalization.LocalizationIndex["SETUP_SERVER_SAVE"])); config = newConfig; diff --git a/SharedLibraryCore/Configuration/ServerConfiguration.cs b/SharedLibraryCore/Configuration/ServerConfiguration.cs index afb18630c..1e09bb3f3 100644 --- a/SharedLibraryCore/Configuration/ServerConfiguration.cs +++ b/SharedLibraryCore/Configuration/ServerConfiguration.cs @@ -31,9 +31,6 @@ namespace SharedLibraryCore.Configuration [ConfigurationOptional] public Uri GameLogServerUrl { get; set; } - [ConfigurationIgnore] - public int Index { get; set; } - private readonly IList rconParsers; private readonly IList eventParsers;