1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 07:13:58 -05:00

reduce warning logs for connecting bots on live radar

This commit is contained in:
RaidMax
2022-04-28 10:35:01 -05:00
parent b013872f14
commit d926901ffa

View File

@ -77,7 +77,15 @@ namespace LiveRadar
lock (lockObject)
{
generatedBotGuid = _botGuidLookups.ContainsKey(botKey)
var hasBotKey = _botGuidLookups.ContainsKey(botKey);
if (!hasBotKey && ((string)E.Extra).IsBotGuid())
{
// edge case where the bot guid has not been registered yet
return Task.CompletedTask;
}
generatedBotGuid = hasBotKey
? _botGuidLookups[botKey]
: (E.Extra.ToString() ?? "0").ConvertGuidToLong(NumberStyles.HexNumber);
}