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

Adjustments to stats to support zombie client

This commit is contained in:
RaidMax
2023-05-09 21:14:13 -05:00
parent baca4f1797
commit ef4033bcb7
3 changed files with 4 additions and 3 deletions

View File

@ -1195,11 +1195,12 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
oldestStat = bucketConfig.RankingExpiration;
}
var oldestStateDate = DateTime.UtcNow - oldestStat;
var performances = await context.Set<EFClientStatistics>()
.AsNoTracking()
.Where(stat => stat.ClientId == clientId)
.Where(stat => stat.ServerId != serverId) // ignore the one we're currently tracking
.Where(stats => stats.UpdatedAt >= DateTimeOffset.UtcNow - oldestStat)
.Where(stats => stats.UpdatedAt >= oldestStateDate)
.Where(stats => stats.TimePlayed >= minPlayTime)
.ToListAsync();