fix bug with additional group mapping key

This commit is contained in:
RaidMax 2021-06-03 13:21:08 -05:00
parent eff1fe237d
commit 16e1bbb1b5

View File

@ -261,11 +261,17 @@ namespace IW4MAdmin.Application.RConParsers
};
client.SetAdditionalProperty("BotGuid", networkIdString);
var additionalGroupIndex = Configuration.Status.GroupMapping[ParserRegex.GroupType.AdditionalGroup];
if (Configuration.Status.GroupMapping.ContainsKey(ParserRegex.GroupType.AdditionalGroup))
{
var additionalGroupIndex =
Configuration.Status.GroupMapping[ParserRegex.GroupType.AdditionalGroup];
if (match.Values.Length > additionalGroupIndex)
{
client.SetAdditionalProperty("ConnectionClientId", match.Values[additionalGroupIndex]);
}
}
StatusPlayers.Add(client);
}