Browse Source

separate rawHostname and cloakedHostname for always-on clients

This affects RPL_WHOISACTUALLY and possibly others.
tags/v2.4.0-rc1
Shivaram Lingamneni 3 years ago
parent
commit
8cd7085d0b
1 changed files with 6 additions and 5 deletions
  1. 6
    5
      irc/client.go

+ 6
- 5
irc/client.go View File

@@ -411,9 +411,9 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
411 411
 		lastSeen = map[string]time.Time{"": now}
412 412
 	}
413 413
 
414
-	hostname := server.name
414
+	rawHostname, cloakedHostname := server.name, ""
415 415
 	if config.Server.Cloaks.EnabledForAlwaysOn {
416
-		hostname = config.Server.Cloaks.ComputeAccountCloak(account.Name)
416
+		cloakedHostname = config.Server.Cloaks.ComputeAccountCloak(account.Name)
417 417
 	}
418 418
 
419 419
 	client := &Client{
@@ -424,9 +424,10 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
424 424
 		languages:  server.Languages().Default(),
425 425
 		server:     server,
426 426
 
427
-		username:    "~user",
428
-		rawHostname: hostname,
429
-		realIP:      utils.IPv4LoopbackAddress,
427
+		username:        "~user",
428
+		cloakedHostname: cloakedHostname,
429
+		rawHostname:     rawHostname,
430
+		realIP:          utils.IPv4LoopbackAddress,
430 431
 
431 432
 		alwaysOn: true,
432 433
 		realname: realname,

Loading…
Cancel
Save