mirror of
https://github.com/schollz/cowyo.git
synced 2023-08-10 21:13:00 +03:00
Removed extraneous fmt.
This commit is contained in:
parent
a0c57004a8
commit
3f3cc1f41a
@ -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