mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2026-02-06 15:20:22 +00:00
添加ban人记忆
This commit is contained in:
@@ -37,7 +37,7 @@ func newantidb(path string) (*antidb, error) {
|
||||
}
|
||||
_ = db.FindFor("__bantime__", nilbt, "", func() error {
|
||||
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 {
|
||||
_ = managers.DoUnblock(nilbt.ID)
|
||||
return nil
|
||||
|
||||
Reference in New Issue
Block a user