1
0
mirror of https://github.com/RaidMax/IW4M-Admin.git synced 2025-06-10 15:20:48 -05:00

add cancellation token for rcon connection to allow more granular control

This commit is contained in:
RaidMax
2022-02-28 20:44:30 -06:00
parent c22bfed99d
commit 57558f6223
17 changed files with 187 additions and 132 deletions

View File

@ -1190,7 +1190,7 @@ namespace SharedLibraryCore.Commands
public static async Task<string> GetNextMap(Server s, ITranslationLookup lookup)
{
var mapRotation = (await s.GetDvarAsync<string>("sv_mapRotation")).Value?.ToLower() ?? "";
var mapRotation = (await s.GetDvarAsync<string>("sv_mapRotation", token: s.Manager.CancellationToken)).Value?.ToLower() ?? "";
var regexMatches = Regex.Matches(mapRotation,
@"((?:gametype|exec) +(?:([a-z]{1,4})(?:.cfg)?))? *map ([a-z|_|\d]+)", RegexOptions.IgnoreCase)
.ToList();