diff --git a/src/irc/client.go b/src/irc/client.go index 81bca3e9..993a19e4 100644 --- a/src/irc/client.go +++ b/src/irc/client.go @@ -4,6 +4,7 @@ import ( "fmt" "log" "net" + "time" ) type Client struct { @@ -20,6 +21,7 @@ type Client struct { wallOps bool server *Server channels ChannelSet + atime time.Time } type ClientSet map[*Client]bool diff --git a/src/irc/server.go b/src/irc/server.go index 99c29451..60fcc2db 100644 --- a/src/irc/server.go +++ b/src/irc/server.go @@ -34,6 +34,7 @@ func NewServer(name string) *Server { go func() { for m := range recv { log.Printf("%s -> %T%+v", m.client.Id(), m.message, m.message) + m.client.atime = time.Now() m.message.Handle(server, m.client) } }()