mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 13:48:00 -05:00
Using TellAsync instead of Tell to prevent Event flooding. (#332)
This commit is contained in:
parent
95523885b8
commit
bc3bd5b0f2
@ -48,12 +48,11 @@ namespace IW4MAdmin.Application.Commands
|
||||
return;
|
||||
}
|
||||
|
||||
foreach (var client in players)
|
||||
{
|
||||
gameEvent.Origin.Tell(_translationLookup["COMMANDS_FIND_FORMAT_V2"].FormatExt(client.Name,
|
||||
client.ClientId, Utilities.ConvertLevelToColor((EFClient.Permission) client.LevelInt, client.Level),
|
||||
client.IPAddress, (DateTime.UtcNow - client.LastConnection).HumanizeForCurrentCulture()));
|
||||
}
|
||||
var messages = players.Select(client => _translationLookup["COMMANDS_FIND_FORMAT_V2"].FormatExt(client.Name,
|
||||
client.ClientId, Utilities.ConvertLevelToColor((EFClient.Permission)client.LevelInt, client.Level),
|
||||
client.IPAddress, (TimeProvider.System.GetUtcNow() - client.LastConnection).HumanizeForCurrentCulture()));
|
||||
|
||||
await gameEvent.Origin.TellAsync(messages);
|
||||
}
|
||||
}
|
||||
}
|
Loading…
x
Reference in New Issue
Block a user