top stats info is per server instead of total when selecting each tab
fix issue with ingame name failing to match when using color codes only show live radar for servers that support it
This commit is contained in:
@ -594,7 +594,7 @@ namespace SharedLibraryCore.Services
|
||||
#endregion
|
||||
|
||||
/// <summary>
|
||||
/// retrieves the number of time the given client id has been reported
|
||||
/// retrieves the number of times the given client id has been reported
|
||||
/// </summary>
|
||||
/// <param name="clientId">client id to search for report counts of</param>
|
||||
/// <returns></returns>
|
||||
@ -609,5 +609,25 @@ namespace SharedLibraryCore.Services
|
||||
.CountAsync();
|
||||
}
|
||||
}
|
||||
|
||||
/// <summary>
|
||||
/// indicates if the given clientid has been autoflagged
|
||||
/// </summary>
|
||||
/// <param name="clientId"></param>
|
||||
/// <returns></returns>
|
||||
public async Task<bool> IsAutoFlagged(int clientId)
|
||||
{
|
||||
using (var ctx = new DatabaseContext(true))
|
||||
{
|
||||
var now = DateTime.UtcNow;
|
||||
return await ctx.Penalties
|
||||
.Where(_penalty => _penalty.Active)
|
||||
.Where(_penalty => _penalty.OffenderId == clientId)
|
||||
.Where(_penalty => _penalty.Type == EFPenalty.PenaltyType.Flag)
|
||||
.Where(_penalty => _penalty.PunisherId == 1)
|
||||
.Where(_penalty => _penalty.Expires == null || _penalty.Expires > now)
|
||||
.AnyAsync();
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user