Log when a address is black/whitelisted
This commit is contained in:
parent
46ffc2d2df
commit
ba769a8435
@ -130,6 +130,7 @@ func gateway_handler(c net.Conn) {
|
||||
func add_to_whitelist(addr string) {
|
||||
// Add the specified address to the whitelist
|
||||
if ! is_whitelisted(addr) {
|
||||
fmt.Println("[OK ] Add ", addr, " to whitelist")
|
||||
update_whitelist_time(addr)
|
||||
}
|
||||
}
|
||||
@ -159,7 +160,10 @@ func is_whitelisted(addr string) bool {
|
||||
|
||||
func add_to_blacklist(addr string) {
|
||||
// Add specified address to blacklist
|
||||
if ! is_blacklisted(addr) {
|
||||
fmt.Println("[OK ] Add ", addr, " to blacklist")
|
||||
blacklist = append(blacklist, addr)
|
||||
}
|
||||
}
|
||||
|
||||
func is_blacklisted(addr string) bool {
|
||||
|
Loading…
Reference in New Issue
Block a user