summaryrefslogtreecommitdiffstats
path: root/gateway
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-04-08 00:42:37 +0200
committerWim <wim@42.be>2017-04-08 00:42:37 +0200
commitb469c8ddbda62ceecbd10883e4af1fbfe5d54898 (patch)
treef483ff9c9aa06aa4cd866a03f386492c3a33dcc7 /gateway
parenteee0036c7f0d711f0af203bf0fb8dccd42241c1a (diff)
downloadmatterbridge-msglm-b469c8ddbda62ceecbd10883e4af1fbfe5d54898.tar.gz
matterbridge-msglm-b469c8ddbda62ceecbd10883e4af1fbfe5d54898.tar.bz2
matterbridge-msglm-b469c8ddbda62ceecbd10883e4af1fbfe5d54898.zip
Rejoin channel when kicked (irc). Closes #146
Diffstat (limited to 'gateway')
-rw-r--r--gateway/gateway.go9
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 {