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

update index for ratings/prune old entries

small stat tweaks to add players on first kill/damage event
(instead of on connect which causes issues with slow writes)
This commit is contained in:
RaidMax
2020-11-14 18:24:51 -06:00
parent d9a7aa9ce9
commit 8a697ca71c
10 changed files with 999 additions and 7 deletions

View File

@ -277,6 +277,13 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
/// <returns>EFClientStatistic of specified player</returns>
public async Task<EFClientStatistics> AddPlayer(EFClient pl)
{
var existingStats = pl.GetAdditionalProperty<EFClientStatistics>(CLIENT_STATS_KEY);
if (existingStats != null)
{
return existingStats;
}
try
{
long serverId = GetIdForServer(pl.CurrentServer);
@ -368,7 +375,7 @@ namespace IW4MAdmin.Plugins.Stats.Helpers
catch (Exception ex)
{
_log.LogError(ex, "Could not add client to stats {@client}", pl);
_log.LogError(ex, "Could not add client to stats {@client}", pl.ToString());
}
return null;