commit 3453ffac1216207b307f95ae215c9ebe8c1e60d8
Author: Wim <wim@42.be>
Date: Sat Dec 23 00:11:30 2017 +0000
diff --git a/bridge/config/config.go b/bridge/config/config.go
index 6953144..13b7a8d 100644
--- a/bridge/config/config.go
+++ b/bridge/config/config.go
@@ -816 +817 @@ type Protocol struct {
Password string // IRC,mattermost,XMPP,matrix
PrefixMessagesWithNick bool // mattemost, slack
Protocol string // all protocols
+ RejoinDelay int // IRC
ReplaceMessages [][]string // all protocols
ReplaceNicks [][]string // all protocols
RemoteNickFormat string // all protocols
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index c9c8cbb..b746597 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -2676 +2677 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) {
channel := event.Params[0]
if event.Command == "KICK" {
flog.Infof("Got kicked from %s by %s", channel, event.Source.Name)
+ time.Sleep(time.Duration(b.Config.RejoinDelay) * time.Second)
b.Remote <- config.Message{Username: "system", Text: "rejoin", Channel: channel, Account: b.Account, Event: config.EVENT_REJOIN_CHANNELS}
return
}
diff --git a/matterbridge.toml.sample b/matterbridge.toml.sample
index c261dec..f3263d5 100644
--- a/matterbridge.toml.sample
+++ b/matterbridge.toml.sample
@@ -856 +8510 @@ MessageLength=400
#OPTIONAL (default false)
MessageSplit=false
+#Delay in seconds to rejoin a channel when kicked
+#OPTIONAL (default 0)
+RejoinDelay=0
+
#Nicks you want to ignore.
#Messages from those users will not be sent to other bridges.
#OPTIONAL