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:
@ -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;
|
||||
|
Reference in New Issue
Block a user