From 8d0adf253d96d64250b64b7cb24c2d3a82080a79 Mon Sep 17 00:00:00 2001 From: Jeremy Latt Date: Mon, 10 Feb 2014 13:52:28 -0800 Subject: [PATCH] configure ipv4/6 in config file --- irc/config.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/irc/config.go b/irc/config.go index f7d4b264..fa5465e6 100644 --- a/irc/config.go +++ b/irc/config.go @@ -19,6 +19,7 @@ type OperatorConfig struct { } type ListenerConfig struct { + Net string Address string Key string Certificate string @@ -39,5 +40,13 @@ func LoadConfig() (config *Config, err error) { decoder := json.NewDecoder(file) err = decoder.Decode(config) + if err != nil { + return + } + for _, lconf := range config.Listeners { + if lconf.Net == "" { + lconf.Net = "tcp" + } + } return }