3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-12-22 18:52:41 +01:00
This commit is contained in:
Shivaram Lingamneni 2020-03-18 05:38:11 -04:00
parent 988d97d68a
commit 39d3194104

View File

@ -2558,13 +2558,7 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
continue
}
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]
}
err, quitMsg := client.ApplyProxiedIP(rb.session, proxiedIP, secure)
err, quitMsg := client.ApplyProxiedIP(rb.session, msg.Params[3], secure)
if err != nil {
client.Quit(quitMsg, rb.session)
return true