Revert "Show ban and note count in ahelp window" (#15347)

This commit is contained in:
metalgearsloth
2023-04-12 19:43:33 +10:00
committed by GitHub
parent d0b9e1b978
commit 3dc0908151
13 changed files with 34 additions and 142 deletions

View File

@@ -330,22 +330,6 @@ namespace Content.Server.Database
ImmutableArray<byte>? hwId,
bool includeUnbanned);
/// <summary>
/// Counts an user's bans.
/// This will return pardoned bans as well.
/// One of <see cref="address"/> or <see cref="userId"/> need to not be null.
/// </summary>
/// <param name="address">The ip address of the user.</param>
/// <param name="userId">The id of the user.</param>
/// <param name="hwId">The HWId of the user.</param>
/// <param name="includeUnbanned">Include pardoned and expired bans.</param>
/// <returns>The user's ban history.</returns>
public abstract Task<int> CountServerBansAsync(
IPAddress? address,
NetUserId? userId,
ImmutableArray<byte>? hwId,
bool includeUnbanned);
public abstract Task AddServerBanAsync(ServerBanDef serverBan);
public abstract Task AddServerUnbanAsync(ServerUnbanDef serverUnban);
@@ -1012,19 +996,6 @@ namespace Content.Server.Database
.ToListAsync();
}
public async Task<int> CountAdminNotes(Guid player)
{
await using var db = await GetDb();
return await db.DbContext.AdminNotes
.Where(note => note.PlayerUserId == player)
.Where(note => !note.Deleted)
.Include(note => note.Round)
.Include(note => note.CreatedBy)
.Include(note => note.LastEditedBy)
.Include(note => note.Player)
.CountAsync();
}
public async Task DeleteAdminNote(int id, Guid deletedBy, DateTime deletedAt)
{
await using var db = await GetDb();