From 2133e0d1bed0bdc2ac10742c0bcf6b0b17a4d175 Mon Sep 17 00:00:00 2001 From: Wim Date: Tue, 6 Mar 2018 20:51:02 +0100 Subject: Use default values part 2 (irc) --- bridge/irc/irc.go | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'bridge') diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go index 1c9ec90e..df1b7df7 100644 --- a/bridge/irc/irc.go +++ b/bridge/irc/irc.go @@ -42,12 +42,18 @@ func New(cfg *bridge.Config) bridge.Bridger { b.connected = make(chan struct{}) if b.GetInt("MessageDelay") == 0 { b.MessageDelay = 1300 + } else { + b.MessageDelay = b.GetInt("MessageDelay") } if b.GetInt("MessageQueue") == 0 { b.MessageQueue = 30 + } else { + b.MessageQueue = b.GetInt("MessageQueue") } if b.GetInt("MessageLength") == 0 { b.MessageLength = 400 + } else { + b.MessageLength = b.GetInt("MessageLength") } b.FirstConnection = true return b -- cgit v1.2.3