mirror of
https://github.com/ergochat/ergo.git
synced 2025-05-06 14:47:29 +02:00
Merge pull request #1316 from slingamn/alwayson_cloak_followup
separate rawHostname and cloakedHostname for always-on clients
This commit is contained in:
commit
2121f17de7
@ -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{
|
||||||
@ -425,7 +425,8 @@ func (server *Server) AddAlwaysOnClient(account ClientAccount, chnames []string,
|
|||||||
server: server,
|
server: server,
|
||||||
|
|
||||||
username: "~user",
|
username: "~user",
|
||||||
rawHostname: hostname,
|
cloakedHostname: cloakedHostname,
|
||||||
|
rawHostname: rawHostname,
|
||||||
realIP: utils.IPv4LoopbackAddress,
|
realIP: utils.IPv4LoopbackAddress,
|
||||||
|
|
||||||
alwaysOn: true,
|
alwaysOn: true,
|
||||||
|
Loading…
x
Reference in New Issue
Block a user