mirror of
https://github.com/FloatTech/ZeroBot-Plugin.git
synced 2025-12-19 13:59:39 +08:00
添加ban人记忆
This commit is contained in:
parent
f5d2bd78b9
commit
0e2d717aa6
@ -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
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user