X-Git-Url: https://git.r.bdr.sh/rbdr/mobius/blobdiff_plain/46862572ad2977a87baeda0aa8a9e678c533559d..4954caf8e103611c106d14a596a04be7c13a2e5f:/hotline/ban.go?ds=sidebyside diff --git a/hotline/ban.go b/hotline/ban.go index 0b75e8e..7a9fd31 100644 --- a/hotline/ban.go +++ b/hotline/ban.go @@ -2,4 +2,10 @@ package hotline import "time" -const tempBanDuration = 30 * time.Minute +// BanDuration is the length of time for temporary bans. +const BanDuration = 30 * time.Minute + +type BanMgr interface { + Add(ip string, until *time.Time) error + IsBanned(ip string) (bool, *time.Time) +}