Role bans (#6703)
This commit is contained in:
@@ -306,6 +306,37 @@ namespace Content.Server.Database
|
||||
public abstract Task AddServerUnbanAsync(ServerUnbanDef serverUnban);
|
||||
#endregion
|
||||
|
||||
#region Role Bans
|
||||
/*
|
||||
* ROLE BANS
|
||||
*/
|
||||
/// <summary>
|
||||
/// Looks up a role ban by id.
|
||||
/// This will return a pardoned role ban as well.
|
||||
/// </summary>
|
||||
/// <param name="id">The role ban id to look for.</param>
|
||||
/// <returns>The role ban with the given id or null if none exist.</returns>
|
||||
public abstract Task<ServerRoleBanDef?> GetServerRoleBanAsync(int id);
|
||||
|
||||
/// <summary>
|
||||
/// Looks up an user's role ban history.
|
||||
/// This will return pardoned role bans based on the <see cref="includeUnbanned"/> bool.
|
||||
/// Requires one of <see cref="address"/>, <see cref="userId"/>, or <see cref="hwId"/> to not be null.
|
||||
/// </summary>
|
||||
/// <param name="address">The IP address of the user.</param>
|
||||
/// <param name="userId">The NetUserId of the user.</param>
|
||||
/// <param name="hwId">The Hardware Id of the user.</param>
|
||||
/// <param name="includeUnbanned">Whether expired and pardoned bans are included.</param>
|
||||
/// <returns>The user's role ban history.</returns>
|
||||
public abstract Task<List<ServerRoleBanDef>> GetServerRoleBansAsync(IPAddress? address,
|
||||
NetUserId? userId,
|
||||
ImmutableArray<byte>? hwId,
|
||||
bool includeUnbanned);
|
||||
|
||||
public abstract Task AddServerRoleBanAsync(ServerRoleBanDef serverRoleBan);
|
||||
public abstract Task AddServerRoleUnbanAsync(ServerRoleUnbanDef serverRoleUnban);
|
||||
#endregion
|
||||
|
||||
#region Player Records
|
||||
/*
|
||||
* PLAYER RECORDS
|
||||
|
||||
Reference in New Issue
Block a user