mirror of
https://github.com/RaidMax/IW4M-Admin.git
synced 2025-06-10 15:20:48 -05:00
add BroadcastAsync
This commit is contained in:
@ -177,7 +177,7 @@ namespace SharedLibraryCore.Database.Models
|
||||
return e;
|
||||
}
|
||||
|
||||
[Obsolete]
|
||||
[Obsolete("Use TellAsync")]
|
||||
public void Tell(IEnumerable<string> messages)
|
||||
{
|
||||
foreach (var message in messages)
|
||||
@ -188,10 +188,15 @@ namespace SharedLibraryCore.Database.Models
|
||||
}
|
||||
}
|
||||
|
||||
public async Task TellAsync(IEnumerable<string> messages, CancellationToken token =default)
|
||||
public async Task TellAsync(IEnumerable<string> messages, CancellationToken token = default)
|
||||
{
|
||||
foreach (var message in messages)
|
||||
{
|
||||
if (token.IsCancellationRequested)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
await Tell(message).WaitAsync(Utilities.DefaultCommandTimeout, token);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user