diff options
author | delthas <delthas@dille.cc> | 2022-12-22 15:24:28 +0100 |
---|---|---|
committer | delthas <delthas@dille.cc> | 2022-12-22 15:24:28 +0100 |
commit | 37623d52b7f34534ac803fb1fe628df57c223f76 (patch) | |
tree | 3d0ceced9642726a1e4098fd08e0cbd086be55a1 | |
parent | Implement /OPER (diff) |
Fix failing on addresses with a literal IP address without URLs
The configuration
addr 127.0.0.1:12345
should now work again.
-rw-r--r-- | config.go | 3 |
1 files changed, 1 insertions, 2 deletions
@@ -141,8 +141,7 @@ func LoadConfigFile(filename string) (cfg Config, err error) { if cfg.Real == "" { cfg.Real = cfg.Nick } - var u *url.URL - if u, err = url.Parse(cfg.Addr); err == nil && u.Scheme != "" { + if u, err := url.Parse(cfg.Addr); err == nil && u.Scheme != "" { switch u.Scheme { case "ircs": cfg.TLS = true |