diff --git a/knockr.go b/knockr.go index 3c2c369..67c49e9 100644 --- a/knockr.go +++ b/knockr.go @@ -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() }