添加ban人记忆

This commit is contained in:
源文雨 2022-09-06 21:24:49 +08:00
parent f5d2bd78b9
commit 0e2d717aa6

View File

@ -37,7 +37,7 @@ func newantidb(path string) (*antidb, error) {
} }
_ = db.FindFor("__bantime__", nilbt, "", func() error { _ = db.FindFor("__bantime__", nilbt, "", func() error {
t := time.Unix(nilbt.Time, 0) t := time.Unix(nilbt.Time, 0)
ttl := time.Until(t.Add(time.Hour * banhour)) // second ttl := time.Until(t.Add(time.Hour * banhour))
if ttl < time.Minute { if ttl < time.Minute {
_ = managers.DoUnblock(nilbt.ID) _ = managers.DoUnblock(nilbt.ID)
return nil return nil