2025-04-26 19:42:23 +00:00
|
|
|
using System.Net;
|
|
|
|
|
2025-04-26 23:15:54 +00:00
|
|
|
namespace SharpChat.Bans;
|
|
|
|
|
|
|
|
public interface BansClient {
|
|
|
|
Task BanCreateAsync(
|
|
|
|
BanKind kind,
|
|
|
|
TimeSpan duration,
|
|
|
|
IPAddress remoteAddr,
|
|
|
|
string? userId = null,
|
|
|
|
string? reason = null,
|
|
|
|
IPAddress? issuerRemoteAddr = null,
|
|
|
|
string? issuerUserId = null
|
|
|
|
);
|
|
|
|
Task<bool> BanRevokeAsync(BanInfo info);
|
|
|
|
Task<BanInfo?> BanGetAsync(string? userIdOrName = null, IPAddress? remoteAddr = null);
|
|
|
|
Task<BanInfo[]> BanGetListAsync();
|
2025-04-26 19:42:23 +00:00
|
|
|
}
|