summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authordelthas <delthas@dille.cc>2022-12-22 15:24:28 +0100
committerdelthas <delthas@dille.cc>2022-12-22 15:24:28 +0100
commit37623d52b7f34534ac803fb1fe628df57c223f76 (patch)
tree3d0ceced9642726a1e4098fd08e0cbd086be55a1
parentImplement /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.go3
1 files changed, 1 insertions, 2 deletions
diff --git a/config.go b/config.go
index a06dc0c..beebf7a 100644
--- a/config.go
+++ b/config.go
@@ -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