mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Removed extraneous fmt.
Former-commit-id: e14a3f63333e04d7dd36445af59971bf4483e38c [formerly 0d230b0ee7017a88627c3829cb3e25723ce16909] [formerly 448638670a680e4e7d69b43ee8024a9cb09dc743 [formerly 83cc0422e5bbc0f4ee0e5c5d7ca7697a31382549 [formerly3f3cc1f41a
]]] Former-commit-id: e8c31b3325d1b75a4b18bb9bcf842a00f5cf6ee8 [formerly 52fba3f6529f7271ed2f3ab3f9c7174acb8276c7] Former-commit-id: 1db89f1ce6fe1d62f73c71baabb01500b9ec0117 Former-commit-id:e9f97aa384
This commit is contained in:
parent
380707cbe6
commit
0f34d342d8
@ -1,9 +1,6 @@
|
|||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import "time"
|
||||||
"fmt"
|
|
||||||
"time"
|
|
||||||
)
|
|
||||||
|
|
||||||
var bannedIPs []string
|
var bannedIPs []string
|
||||||
|
|
||||||
@ -13,7 +10,6 @@ func init() {
|
|||||||
|
|
||||||
func clearBannedIPs() {
|
func clearBannedIPs() {
|
||||||
for {
|
for {
|
||||||
fmt.Println("CLEARING IPS!!")
|
|
||||||
bannedIPs = []string{}
|
bannedIPs = []string{}
|
||||||
time.Sleep(3 * time.Minute)
|
time.Sleep(3 * time.Minute)
|
||||||
}
|
}
|
||||||
@ -23,7 +19,7 @@ func isIPBanned(ip string) bool {
|
|||||||
if stringInSlice(ip, bannedIPs) {
|
if stringInSlice(ip, bannedIPs) {
|
||||||
return true
|
return true
|
||||||
} else {
|
} else {
|
||||||
bannedIPs = append(bannedIPs, ip)
|
bannedIPs = append(bannedIPs, ip)
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user