From c53895ca11ea1f02f1786944a08e864b81d5dc44 Mon Sep 17 00:00:00 2001 From: RaidMax Date: Mon, 14 Dec 2020 21:10:50 -0600 Subject: [PATCH] resolve bot guid issue with T5 remove unneeded check for CNCT state --- Application/RconParsers/BaseRConParser.cs | 8 +++----- Plugins/ScriptPlugins/ParserT4.js | 4 ++-- SharedLibraryCore/Utilities.cs | 3 +-- 3 files changed, 6 insertions(+), 9 deletions(-) diff --git a/Application/RconParsers/BaseRConParser.cs b/Application/RconParsers/BaseRConParser.cs index c77da243..45b763c9 100644 --- a/Application/RconParsers/BaseRConParser.cs +++ b/Application/RconParsers/BaseRConParser.cs @@ -205,8 +205,7 @@ namespace IW4MAdmin.Application.RconParsers if (match.Success) { - if (match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "ZMBI" || - match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "CNCT") + if (match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "ZMBI") { _logger.LogDebug("Ignoring detected client {client} because they are zombie state", string.Join(",", match.Values)); continue; @@ -226,12 +225,13 @@ namespace IW4MAdmin.Application.RconParsers long networkId; string name = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConName]].TrimNewLine(); string networkIdString; + var ip = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConIpAddress]].Split(':')[0].ConvertToIP(); try { networkIdString = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConNetworkId]]; - networkId = networkIdString.IsBotGuid() ? + networkId = networkIdString.IsBotGuid() || (ip == null && ping == 999) ? name.GenerateGuidFromString() : networkIdString.ConvertGuidToLong(Configuration.GuidNumberStyle); } @@ -241,8 +241,6 @@ namespace IW4MAdmin.Application.RconParsers continue; } - int? ip = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConIpAddress]].Split(':')[0].ConvertToIP(); - var client = new EFClient() { CurrentAlias = new EFAlias() diff --git a/Plugins/ScriptPlugins/ParserT4.js b/Plugins/ScriptPlugins/ParserT4.js index 8186fc38..e3f68f20 100644 --- a/Plugins/ScriptPlugins/ParserT4.js +++ b/Plugins/ScriptPlugins/ParserT4.js @@ -15,11 +15,11 @@ var plugin = { eventParser = manager.GenerateDynamicEventParser(this.name); rconParser.Configuration.CommandPrefixes.RConResponse = '\xff\xff\xff\xffprint\n'; rconParser.Configuration.GuidNumberStyle = 7; // Integer - rconParser.Version = "Call of Duty Multiplayer COD_WaW MP build 1.7.1263 CL(350073) JADAMS2 Thu Oct 29 15:43:55 2009 win-x86"; + rconParser.Version = 'Call of Duty Multiplayer COD_WaW MP build 1.7.1263 CL(350073) JADAMS2 Thu Oct 29 15:43:55 2009 win-x86'; eventParser.Configuration.GuidNumberStyle = 7; // Integer eventParser.GameName = 5; // T4 - eventParser.Version = "Call of Duty Multiplayer COD_WaW MP build 1.7.1263 CL(350073) JADAMS2 Thu Oct 29 15:43:55 2009 win-x86"; + eventParser.Version = 'Call of Duty Multiplayer COD_WaW MP build 1.7.1263 CL(350073) JADAMS2 Thu Oct 29 15:43:55 2009 win-x86'; }, onUnloadAsync: function () { diff --git a/SharedLibraryCore/Utilities.cs b/SharedLibraryCore/Utilities.cs index f956268e..ac8a91a6 100644 --- a/SharedLibraryCore/Utilities.cs +++ b/SharedLibraryCore/Utilities.cs @@ -366,8 +366,7 @@ namespace SharedLibraryCore /// true if is bot guid, otherwise false public static bool IsBotGuid(this string guid) { - // todo: revisit this magic number for cod5 bot guid - return guid.Contains("bot") || guid == "0" || guid == "1075569476"; + return guid.Contains("bot") || guid == "0"; } ///