3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-26 22:09:24 +01:00
This commit is contained in:
Shivaram Lingamneni 2018-08-28 14:20:33 -04:00
parent c3d197f4ff
commit 0e5842b33a

View File

@ -2411,6 +2411,11 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
} }
proxiedIP := msg.Params[3] proxiedIP := msg.Params[3]
// see #211; websocket gateways will wrap ipv6 addresses in square brackets
// because IRC parameters can't start with :
if strings.HasPrefix(proxiedIP, "[") && strings.HasSuffix(proxiedIP, "]") {
proxiedIP = proxiedIP[1 : len(proxiedIP)-1]
}
return client.ApplyProxiedIP(proxiedIP, secure) return client.ApplyProxiedIP(proxiedIP, secure)
} }
} }