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
 	client.run(session, proxyLine)
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
 	now := time.Now().UTC()
312
 	now := time.Now().UTC()
313
 	config := server.Config()
313
 	config := server.Config()
314
-	if lastActive.IsZero() {
315
-		lastActive = now
314
+	if lastSeen.IsZero() {
315
+		lastSeen = now
316
 	}
316
 	}
317
 
317
 
318
 	client := &Client{
318
 	client := &Client{
319
-		lastSeen:   now,
320
-		lastActive: lastActive,
319
+		lastSeen:   lastSeen,
320
+		lastActive: now,
321
 		channels:   make(ChannelSet),
321
 		channels:   make(ChannelSet),
322
 		ctime:      now,
322
 		ctime:      now,
323
 		languages:  server.Languages().Default(),
323
 		languages:  server.Languages().Default(),

Loading…
Cancel
Save