Tidy up code a bit

This commit is contained in:
maride 2017-09-27 16:44:52 +02:00
parent e99e804013
commit 9d80c93177

View File

@ -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()
}