summaryrefslogtreecommitdiffstats
path: root/bridge/bridge.go
diff options
context:
space:
mode:
authorWim <wim@42.be>2020-04-19 00:46:35 +0200
committerGitHub <noreply@github.com>2020-04-19 00:46:35 +0200
commit9190365289f841f6764741d36d54bde0f8f2b623 (patch)
treea976ecf6e4ce921bcae12c2876b3ea992a7a9dd3 /bridge/bridge.go
parent57794b3b9f246c2ae08f8709f05d39b4fc420f29 (diff)
downloadmatterbridge-msglm-9190365289f841f6764741d36d54bde0f8f2b623.tar.gz
matterbridge-msglm-9190365289f841f6764741d36d54bde0f8f2b623.tar.bz2
matterbridge-msglm-9190365289f841f6764741d36d54bde0f8f2b623.zip
Add JoinDelay option (irc). Fixes #1084 (#1098)
Diffstat (limited to 'bridge/bridge.go')
-rw-r--r--bridge/bridge.go2
1 files changed, 2 insertions, 0 deletions
diff --git a/bridge/bridge.go b/bridge/bridge.go
index 5612e35d..eec2bfaf 100644
--- a/bridge/bridge.go
+++ b/bridge/bridge.go
@@ -4,6 +4,7 @@ import (
"log"
"strings"
"sync"
+ "time"
"github.com/42wim/matterbridge/bridge/config"
"github.com/sirupsen/logrus"
@@ -74,6 +75,7 @@ func (b *Bridge) joinChannels(channels map[string]config.ChannelInfo, exists map
for ID, channel := range channels {
if !exists[ID] {
b.Log.Infof("%s: joining %s (ID: %s)", b.Account, channel.Name, ID)
+ time.Sleep(time.Duration(b.GetInt("JoinDelay")) * time.Millisecond)
err := b.JoinChannel(channel)
if err != nil {
return err