From 8cd7085d0be6a75d334c939d3a6fba5d887981d7 Mon Sep 17 00:00:00 2001 From: Shivaram Lingamneni Date: Fri, 9 Oct 2020 11:11:06 -0400 Subject: [PATCH] separate rawHostname and cloakedHostname for always-on clients This affects RPL_WHOISACTUALLY and possibly others. --- irc/client.go | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/irc/client.go b/irc/client.go index 6256390a..4ca9434f 100644 --- a/irc/client.go +++ b/irc/client.go @@ -411,9 +411,9 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, lastSeen = map[string]time.Time{"": now} } - hostname := server.name + rawHostname, cloakedHostname := server.name, "" if config.Server.Cloaks.EnabledForAlwaysOn { - hostname = config.Server.Cloaks.ComputeAccountCloak(account.Name) + cloakedHostname = config.Server.Cloaks.ComputeAccountCloak(account.Name) } client := &Client{ @@ -424,9 +424,10 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string, languages: server.Languages().Default(), server: server, - username: "~user", - rawHostname: hostname, - realIP: utils.IPv4LoopbackAddress, + username: "~user", + cloakedHostname: cloakedHostname, + rawHostname: rawHostname, + realIP: utils.IPv4LoopbackAddress, alwaysOn: true, realname: realname,