From 5447fc79ffe303195da3a934dc2c71bc011dcf6b Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Mon, 2 Mar 2020 03:06:57 -0500 Subject: [PATCH] fix confusion between lastSeen and lastActive --- irc/client.go | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/irc/client.go b/irc/client.go index fab3d6a1..58be9196 100644 --- a/irc/client.go +++ b/irc/client.go @@ -308,16 +308,16 @@ func (server *Server) RunClient(conn clientConn, proxyLine string) { client.run(session, proxyLine) } -func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastActive time.Time) { +func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastSeen time.Time) { now := time.Now().UTC() config := server.Config() - if lastActive.IsZero() { - lastActive = now + if lastSeen.IsZero() { + lastSeen = now } client := &Client{ - lastSeen: now, - lastActive: lastActive, + lastSeen: lastSeen, + lastActive: now, channels: make(ChannelSet), ctime: now, languages: server.Languages().Default(),