From b469c8ddbda62ceecbd10883e4af1fbfe5d54898 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 8 Apr 2017 00:42:37 +0200 Subject: Rejoin channel when kicked (irc). Closes #146 --- gateway/gateway.go | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'gateway') 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 { -- cgit v1.2.3