mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-07 21:58:06 -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;
|
return;
|
||||||
}
|
}
|
||||||
|
|
||||||
foreach (var client in players)
|
var messages = players.Select(client => _translationLookup["COMMANDS_FIND_FORMAT_V2"].FormatExt(client.Name,
|
||||||
{
|
client.ClientId, Utilities.ConvertLevelToColor((EFClient.Permission)client.LevelInt, client.Level),
|
||||||
gameEvent.Origin.Tell(_translationLookup["COMMANDS_FIND_FORMAT_V2"].FormatExt(client.Name,
|
client.IPAddress, (TimeProvider.System.GetUtcNow() - client.LastConnection).HumanizeForCurrentCulture()));
|
||||||
client.ClientId, Utilities.ConvertLevelToColor((EFClient.Permission) client.LevelInt, client.Level),
|
|
||||||
client.IPAddress, (DateTime.UtcNow - client.LastConnection).HumanizeForCurrentCulture()));
|
await gameEvent.Origin.TellAsync(messages);
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user