Browse Source

fix confusion between lastSeen and lastActive

tags/v2.0.0
Shivaram Lingamneni 4 years ago
parent
commit
5447fc79ff
1 changed files with 5 additions and 5 deletions
  1. 5
    5
      irc/client.go

+ 5
- 5
irc/client.go View File

@@ -308,16 +308,16 @@ func (server *Server) RunClient(conn clientConn, proxyLine string) {
308 308
 	client.run(session, proxyLine)
309 309
 }
310 310
 
311
-func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastActive time.Time) {
311
+func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastSeen time.Time) {
312 312
 	now := time.Now().UTC()
313 313
 	config := server.Config()
314
-	if lastActive.IsZero() {
315
-		lastActive = now
314
+	if lastSeen.IsZero() {
315
+		lastSeen = now
316 316
 	}
317 317
 
318 318
 	client := &Client{
319
-		lastSeen:   now,
320
-		lastActive: lastActive,
319
+		lastSeen:   lastSeen,
320
+		lastActive: now,
321 321
 		channels:   make(ChannelSet),
322 322
 		ctime:      now,
323 323
 		languages:  server.Languages().Default(),

Loading…
Cancel
Save