resolve bot guid issue with T5

remove unneeded check for CNCT state
This commit is contained in:
RaidMax 2020-12-14 21:10:50 -06:00
parent 02b910234a
commit 928cbef845
3 changed files with 6 additions and 9 deletions

View File

@ -205,8 +205,7 @@ namespace IW4MAdmin.Application.RconParsers
if (match.Success) if (match.Success)
{ {
if (match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "ZMBI" || if (match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "ZMBI")
match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConPing]] == "CNCT")
{ {
_logger.LogDebug("Ignoring detected client {client} because they are zombie state", string.Join(",", match.Values)); _logger.LogDebug("Ignoring detected client {client} because they are zombie state", string.Join(",", match.Values));
continue; continue;
@ -226,12 +225,13 @@ namespace IW4MAdmin.Application.RconParsers
long networkId; long networkId;
string name = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConName]].TrimNewLine(); string name = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConName]].TrimNewLine();
string networkIdString; string networkIdString;
var ip = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConIpAddress]].Split(':')[0].ConvertToIP();
try try
{ {
networkIdString = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConNetworkId]]; networkIdString = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConNetworkId]];
networkId = networkIdString.IsBotGuid() ? networkId = networkIdString.IsBotGuid() || (ip == null && ping == 999) ?
name.GenerateGuidFromString() : name.GenerateGuidFromString() :
networkIdString.ConvertGuidToLong(Configuration.GuidNumberStyle); networkIdString.ConvertGuidToLong(Configuration.GuidNumberStyle);
} }
@ -241,8 +241,6 @@ namespace IW4MAdmin.Application.RconParsers
continue; continue;
} }
int? ip = match.Values[Configuration.Status.GroupMapping[ParserRegex.GroupType.RConIpAddress]].Split(':')[0].ConvertToIP();
var client = new EFClient() var client = new EFClient()
{ {
CurrentAlias = new EFAlias() CurrentAlias = new EFAlias()

View File

@ -15,11 +15,11 @@ var plugin = {
eventParser = manager.GenerateDynamicEventParser(this.name); eventParser = manager.GenerateDynamicEventParser(this.name);
rconParser.Configuration.CommandPrefixes.RConResponse = '\xff\xff\xff\xffprint\n'; rconParser.Configuration.CommandPrefixes.RConResponse = '\xff\xff\xff\xffprint\n';
rconParser.Configuration.GuidNumberStyle = 7; // Integer 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.Configuration.GuidNumberStyle = 7; // Integer
eventParser.GameName = 5; // T4 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 () { onUnloadAsync: function () {

View File

@ -366,8 +366,7 @@ namespace SharedLibraryCore
/// <returns>true if is bot guid, otherwise false</returns> /// <returns>true if is bot guid, otherwise false</returns>
public static bool IsBotGuid(this string guid) public static bool IsBotGuid(this string guid)
{ {
// todo: revisit this magic number for cod5 bot guid return guid.Contains("bot") || guid == "0";
return guid.Contains("bot") || guid == "0" || guid == "1075569476";
} }
/// <summary> /// <summary>