Tidy up code a bit
This commit is contained in:
parent
e99e804013
commit
9d80c93177
@ -34,12 +34,8 @@ func listener(port int, listen_func func(c net.Conn)) {
|
||||
func whitelist_handler(c net.Conn) {
|
||||
host, _, _ := net.SplitHostPort(c.RemoteAddr().String())
|
||||
|
||||
io.WriteString(c, "Knock Knock, ")
|
||||
io.WriteString(c, host)
|
||||
io.WriteString(c, ". ")
|
||||
|
||||
io.WriteString(c, fmt.Sprintf("Knock Knock, %s.", host))
|
||||
add_to_whitelist(host)
|
||||
|
||||
c.Close()
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user