commit 37623d5
delthas
·
2022-12-22 14:24:28 +0000 UTC
parent 0844932
Fix failing on addresses with a literal IP address without URLs
The configuration
addr 127.0.0.1:12345
should now work again.
1 files changed,
+1,
-2
+1,
-2
1@@ -141,8 +141,7 @@ func LoadConfigFile(filename string) (cfg Config, err error) {
2 if cfg.Real == "" {
3 cfg.Real = cfg.Nick
4 }
5- var u *url.URL
6- if u, err = url.Parse(cfg.Addr); err == nil && u.Scheme != "" {
7+ if u, err := url.Parse(cfg.Addr); err == nil && u.Scheme != "" {
8 switch u.Scheme {
9 case "ircs":
10 cfg.TLS = true