mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
fix #211
This commit is contained in:
parent
c3d197f4ff
commit
0e5842b33a
@ -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)
|
||||
}
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user