mirror of
https://github.com/ergochat/ergo.git
synced 2025-12-22 11:02:06 -08:00
clean something up in ApplyProxiedIP
This commit is contained in:
parent
1dbe01b09a
commit
0d2cf21cec
1 changed files with 5 additions and 3 deletions
|
|
@ -61,13 +61,15 @@ func (client *Client) ApplyProxiedIP(proxiedIP string, tls bool) (success bool)
|
||||||
}
|
}
|
||||||
|
|
||||||
// given IP is sane! override the client's current IP
|
// given IP is sane! override the client's current IP
|
||||||
rawHostname := utils.LookupHostname(parsedProxiedIP.String())
|
ipstring := parsedProxiedIP.String()
|
||||||
|
client.server.logger.Info("localconnect-ip", "Accepted proxy IP for client", ipstring)
|
||||||
|
rawHostname := utils.LookupHostname(ipstring)
|
||||||
|
|
||||||
client.stateMutex.Lock()
|
client.stateMutex.Lock()
|
||||||
|
defer client.stateMutex.Unlock()
|
||||||
client.proxiedIP = parsedProxiedIP
|
client.proxiedIP = parsedProxiedIP
|
||||||
client.rawHostname = rawHostname
|
client.rawHostname = rawHostname
|
||||||
client.stateMutex.Unlock()
|
|
||||||
// nickmask will be updated when the client completes registration
|
// nickmask will be updated when the client completes registration
|
||||||
|
|
||||||
// set tls info
|
// set tls info
|
||||||
client.certfp = ""
|
client.certfp = ""
|
||||||
client.SetMode(modes.TLS, tls)
|
client.SetMode(modes.TLS, tls)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue