19 lines
564 B
C#
19 lines
564 B
C#
|
using System.Net;
|
||
|
|
||
|
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();
|
||
|
}
|
||
|
}
|