mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-25 20:11:36 +00:00
parent
57794b3b9f
commit
9190365289
@ -4,6 +4,7 @@ import (
|
|||||||
"log"
|
"log"
|
||||||
"strings"
|
"strings"
|
||||||
"sync"
|
"sync"
|
||||||
|
"time"
|
||||||
|
|
||||||
"github.com/42wim/matterbridge/bridge/config"
|
"github.com/42wim/matterbridge/bridge/config"
|
||||||
"github.com/sirupsen/logrus"
|
"github.com/sirupsen/logrus"
|
||||||
@ -74,6 +75,7 @@ func (b *Bridge) joinChannels(channels map[string]config.ChannelInfo, exists map
|
|||||||
for ID, channel := range channels {
|
for ID, channel := range channels {
|
||||||
if !exists[ID] {
|
if !exists[ID] {
|
||||||
b.Log.Infof("%s: joining %s (ID: %s)", b.Account, channel.Name, 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)
|
err := b.JoinChannel(channel)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return err
|
return err
|
||||||
|
@ -89,6 +89,7 @@ type Protocol struct {
|
|||||||
IgnoreNicks string // all protocols
|
IgnoreNicks string // all protocols
|
||||||
IgnoreMessages string // all protocols
|
IgnoreMessages string // all protocols
|
||||||
Jid string // xmpp
|
Jid string // xmpp
|
||||||
|
JoinDelay string // all protocols
|
||||||
Label string // all protocols
|
Label string // all protocols
|
||||||
Login string // mattermost, matrix
|
Login string // mattermost, matrix
|
||||||
MediaDownloadBlackList []string
|
MediaDownloadBlackList []string
|
||||||
|
@ -177,6 +177,12 @@ StripNick=false
|
|||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
ShowTopicChange=false
|
ShowTopicChange=false
|
||||||
|
|
||||||
|
#Delay in milliseconds between channel joins
|
||||||
|
#Only useful when you have a LOT of channels to join
|
||||||
|
#See https://github.com/42wim/matterbridge/issues/1084
|
||||||
|
#OPTIONAL (default 0)
|
||||||
|
JoinDelay=0
|
||||||
|
|
||||||
###################################################################
|
###################################################################
|
||||||
#XMPP section
|
#XMPP section
|
||||||
###################################################################
|
###################################################################
|
||||||
|
Loading…
Reference in New Issue
Block a user