mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
separate rawHostname and cloakedHostname for always-on clients
This affects RPL_WHOISACTUALLY and possibly others.
This commit is contained in:
parent
f5374c014b
commit
8cd7085d0b
@ -411,9 +411,9 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
|
|||||||
lastSeen = map[string]time.Time{"": now}
|
lastSeen = map[string]time.Time{"": now}
|
||||||
}
|
}
|
||||||
|
|
||||||
hostname := server.name
|
rawHostname, cloakedHostname := server.name, ""
|
||||||
if config.Server.Cloaks.EnabledForAlwaysOn {
|
if config.Server.Cloaks.EnabledForAlwaysOn {
|
||||||
hostname = config.Server.Cloaks.ComputeAccountCloak(account.Name)
|
cloakedHostname = config.Server.Cloaks.ComputeAccountCloak(account.Name)
|
||||||
}
|
}
|
||||||
|
|
||||||
client := &Client{
|
client := &Client{
|
||||||
@ -424,9 +424,10 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
|
|||||||
languages: server.Languages().Default(),
|
languages: server.Languages().Default(),
|
||||||
server: server,
|
server: server,
|
||||||
|
|
||||||
username: "~user",
|
username: "~user",
|
||||||
rawHostname: hostname,
|
cloakedHostname: cloakedHostname,
|
||||||
realIP: utils.IPv4LoopbackAddress,
|
rawHostname: rawHostname,
|
||||||
|
realIP: utils.IPv4LoopbackAddress,
|
||||||
|
|
||||||
alwaysOn: true,
|
alwaysOn: true,
|
||||||
realname: realname,
|
realname: realname,
|
||||||
|
Loading…
Reference in New Issue
Block a user