Use default values part 2 (irc)

This commit is contained in:
Wim 2018-03-06 20:51:02 +01:00
parent a6f37f1d61
commit 2133e0d1be

View File

@ -42,12 +42,18 @@ func New(cfg *bridge.Config) bridge.Bridger {
b.connected = make(chan struct{}) b.connected = make(chan struct{})
if b.GetInt("MessageDelay") == 0 { if b.GetInt("MessageDelay") == 0 {
b.MessageDelay = 1300 b.MessageDelay = 1300
} else {
b.MessageDelay = b.GetInt("MessageDelay")
} }
if b.GetInt("MessageQueue") == 0 { if b.GetInt("MessageQueue") == 0 {
b.MessageQueue = 30 b.MessageQueue = 30
} else {
b.MessageQueue = b.GetInt("MessageQueue")
} }
if b.GetInt("MessageLength") == 0 { if b.GetInt("MessageLength") == 0 {
b.MessageLength = 400 b.MessageLength = 400
} else {
b.MessageLength = b.GetInt("MessageLength")
} }
b.FirstConnection = true b.FirstConnection = true
return b return b