mirror of
https://github.com/cwinfo/matterbridge.git
synced 2024-11-09 16:50:30 +00:00
Add RejoinDelay option. Delay to rejoin after channel kick (irc). Closes #322
This commit is contained in:
parent
d0c4fe78ee
commit
97c944bb63
@ -81,6 +81,7 @@ type Protocol struct {
|
|||||||
Password string // IRC,mattermost,XMPP,matrix
|
Password string // IRC,mattermost,XMPP,matrix
|
||||||
PrefixMessagesWithNick bool // mattemost, slack
|
PrefixMessagesWithNick bool // mattemost, slack
|
||||||
Protocol string // all protocols
|
Protocol string // all protocols
|
||||||
|
RejoinDelay int // IRC
|
||||||
ReplaceMessages [][]string // all protocols
|
ReplaceMessages [][]string // all protocols
|
||||||
ReplaceNicks [][]string // all protocols
|
ReplaceNicks [][]string // all protocols
|
||||||
RemoteNickFormat string // all protocols
|
RemoteNickFormat string // all protocols
|
||||||
|
@ -267,6 +267,7 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) {
|
|||||||
channel := event.Params[0]
|
channel := event.Params[0]
|
||||||
if event.Command == "KICK" {
|
if event.Command == "KICK" {
|
||||||
flog.Infof("Got kicked from %s by %s", channel, event.Source.Name)
|
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}
|
b.Remote <- config.Message{Username: "system", Text: "rejoin", Channel: channel, Account: b.Account, Event: config.EVENT_REJOIN_CHANNELS}
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
@ -85,6 +85,10 @@ MessageLength=400
|
|||||||
#OPTIONAL (default false)
|
#OPTIONAL (default false)
|
||||||
MessageSplit=false
|
MessageSplit=false
|
||||||
|
|
||||||
|
#Delay in seconds to rejoin a channel when kicked
|
||||||
|
#OPTIONAL (default 0)
|
||||||
|
RejoinDelay=0
|
||||||
|
|
||||||
#Nicks you want to ignore.
|
#Nicks you want to ignore.
|
||||||
#Messages from those users will not be sent to other bridges.
|
#Messages from those users will not be sent to other bridges.
|
||||||
#OPTIONAL
|
#OPTIONAL
|
||||||
|
Loading…
Reference in New Issue
Block a user