We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 6fa5ea8 commit f525072Copy full SHA for f525072
pkg/webircgateway/client.go
@@ -334,10 +334,10 @@ func (c *Client) connectUpstream() {
334
}
335
336
remoteAddr := client.RemoteAddr
337
- // Wrap IPv6 addresses so they can be sent as an individual IRC parameter
338
- // eg. ::1 would not parse correctly as a parameter, while [::1] will
339
- if strings.Contains(remoteAddr, ":") {
340
- remoteAddr = "[" + remoteAddr + "]"
+ // Prefix IPv6 addresses that start with a : so they can be sent as an individual IRC
+ // parameter. eg. ::1 would not parse correctly as a parameter, while 0::1 will
+ if strings.HasPrefix(remoteAddr, ":") {
+ remoteAddr = "0" + remoteAddr
341
342
343
webircLine := fmt.Sprintf(
0 commit comments