diff options
author | Wim <wim@42.be> | 2017-04-08 00:42:37 +0200 |
---|---|---|
committer | Wim <wim@42.be> | 2017-04-08 00:42:37 +0200 |
commit | b469c8ddbda62ceecbd10883e4af1fbfe5d54898 (patch) | |
tree | f483ff9c9aa06aa4cd866a03f386492c3a33dcc7 /gateway/gateway.go | |
parent | eee0036c7f0d711f0af203bf0fb8dccd42241c1a (diff) | |
download | matterbridge-msglm-b469c8ddbda62ceecbd10883e4af1fbfe5d54898.tar.gz matterbridge-msglm-b469c8ddbda62ceecbd10883e4af1fbfe5d54898.tar.bz2 matterbridge-msglm-b469c8ddbda62ceecbd10883e4af1fbfe5d54898.zip |
Rejoin channel when kicked (irc). Closes #146
Diffstat (limited to 'gateway/gateway.go')
-rw-r--r-- | gateway/gateway.go | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go index 140bfc4d..b550430a 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -103,6 +103,15 @@ func (gw *Gateway) handleReceive() { } } } + if msg.Event == config.EVENT_REJOIN_CHANNELS { + for _, br := range gw.Bridges { + if msg.Account == br.Account { + br.Joined = make(map[string]bool) + br.JoinChannels() + } + } + continue + } if !gw.ignoreMessage(&msg) { msg.Timestamp = time.Now() for _, br := range gw.Bridges { |