From 8a875f292eb32cf6e71545a2d1b1652a8a56d6ed Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 6 Apr 2019 22:55:57 +0200 Subject: Revert fix for #722. Closes #781 Revert "Fix typo" This reverts commit dffd67eb311580aa2b14e7f5a069cfefdbf3aacc. Revert "Handle quit message relay better on gateways with one channel on the irc bridge #722" This reverts commit 240559581a225ff632c00a52e029b3728c61309e. Revert "Support quits from irc correctly. Fixes #722 (#724)" This reverts commit d76a04bd0a96772cec5b279aaa1ee45235adc707. --- gateway/gateway.go | 17 ----------------- 1 file changed, 17 deletions(-) (limited to 'gateway') diff --git a/gateway/gateway.go b/gateway/gateway.go index 9957a21d..e76e1d59 100644 --- a/gateway/gateway.go +++ b/gateway/gateway.go @@ -212,23 +212,6 @@ func (gw *Gateway) getDestChannel(msg *config.Message, dest bridge.Bridge) []con return channels } - // irc quit is for the whole bridge, isn't a per channel quit. - // channel is empty when we quit - if msg.Event == config.EventJoinLeave && getProtocol(msg) == "irc" && msg.Channel == "" { - // if we only have one channel on this irc bridge it's got to be the sending one. - // don't send it back - if dest.Account == msg.Account && len(dest.Channels) == 1 && dest.Protocol == "irc" { - return channels - } - for _, channel := range gw.Channels { - if channel.Account == dest.Account && strings.Contains(channel.Direction, "out") && - gw.validGatewayDest(msg) { - channels = append(channels, *channel) - } - } - return channels - } - // if source channel is in only, do nothing for _, channel := range gw.Channels { // lookup the channel from the message -- cgit v1.2.3