downstream: rejigger hostname logic in newDOwnstreamConn
I find it easier to read this way.
This commit is contained in:
parent
e403b88a3d
commit
069625d30d
@ -341,9 +341,10 @@ func newDownstreamConn(srv *Server, ic ircConn, id uint64) *downstreamConn {
|
||||
registration: new(downstreamRegistration),
|
||||
}
|
||||
dc.monitored.SetCasemapping(casemapASCII)
|
||||
dc.hostname = remoteAddr
|
||||
if host, _, err := net.SplitHostPort(dc.hostname); err == nil {
|
||||
if host, _, err := net.SplitHostPort(remoteAddr); err == nil {
|
||||
dc.hostname = host
|
||||
} else {
|
||||
dc.hostname = remoteAddr
|
||||
}
|
||||
for k, v := range permanentDownstreamCaps {
|
||||
dc.caps.Available[k] = v
|
||||
|
Loading…
Reference in New Issue
Block a user