idle/quit timeout

This commit is contained in:
Jeremy Latt 2014-02-09 12:13:09 -08:00
parent 8a90634c0a
commit 133b91b9f0
4 changed files with 47 additions and 8 deletions

View file

@ -47,7 +47,8 @@ func (server *Server) receiveCommands(commands <-chan Command) {
log.Printf("%s → %s : %s", command.Client(), server, command)
}
client := command.Client()
client.atime = time.Now()
client.Touch()
if !client.serverPass {
if server.password == "" {
client.serverPass = true