14 lines
189 B
Go
14 lines
189 B
Go
package internal
|
|
|
|
import "time"
|
|
|
|
func CleanupBans() {
|
|
mu.Lock()
|
|
defer mu.Unlock()
|
|
for ip, banTime := range bannedIPs {
|
|
if time.Now().After(banTime) {
|
|
delete(bannedIPs, ip)
|
|
}
|
|
}
|
|
}
|