Browse Source

fix #211

tags/v0.12.0
Shivaram Lingamneni 5 years ago
parent
commit
0e5842b33a
1 changed files with 5 additions and 0 deletions
  1. 5
    0
      irc/handlers.go

+ 5
- 0
irc/handlers.go View File

@@ -2411,6 +2411,11 @@ func webircHandler(server *Server, client *Client, msg ircmsg.IrcMessage, rb *Re
2411 2411
 				}
2412 2412
 
2413 2413
 				proxiedIP := msg.Params[3]
2414
+				// see #211; websocket gateways will wrap ipv6 addresses in square brackets
2415
+				// because IRC parameters can't start with :
2416
+				if strings.HasPrefix(proxiedIP, "[") && strings.HasSuffix(proxiedIP, "]") {
2417
+					proxiedIP = proxiedIP[1 : len(proxiedIP)-1]
2418
+				}
2414 2419
 				return client.ApplyProxiedIP(proxiedIP, secure)
2415 2420
 			}
2416 2421
 		}

Loading…
Cancel
Save