3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-22 20:09: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 continue
} }
proxiedIP := msg.Params[3] err, quitMsg := client.ApplyProxiedIP(rb.session, msg.Params[3], secure)
// 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)
if err != nil { if err != nil {
client.Quit(quitMsg, rb.session) client.Quit(quitMsg, rb.session)
return true return true