This commit is contained in:
Shivaram Lingamneni 2018-08-28 14:20:33 -04:00
parent c3d197f4ff
commit 0e5842b33a
1 changed files with 5 additions and 0 deletions

View File

@ -2411,6 +2411,11 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
}
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)
}
}