summaryrefslogtreecommitdiffstats
path: root/gateway
diff options
context:
space:
mode:
authorWim <wim@42.be>2016-11-14 22:53:06 +0100
committerWim <wim@42.be>2016-11-14 22:53:06 +0100
commit449ed31e25f2c21ac9db258999a5a893889983eb (patch)
treefea6132df575adc0b6318475eaea5fc3e4f17ab6 /gateway
parent1f3690458885ada309be4737e4afb7bb5ecc7ad5 (diff)
downloadmatterbridge-msglm-449ed31e25f2c21ac9db258999a5a893889983eb.tar.gz
matterbridge-msglm-449ed31e25f2c21ac9db258999a5a893889983eb.tar.bz2
matterbridge-msglm-449ed31e25f2c21ac9db258999a5a893889983eb.zip
Fix ShowJoinPart from irc bridge. Closes #72
Diffstat (limited to 'gateway')
-rw-r--r--gateway/gateway.go8
1 files changed, 8 insertions, 0 deletions
diff --git a/gateway/gateway.go b/gateway/gateway.go
index 580e129d..63da4bba 100644
--- a/gateway/gateway.go
+++ b/gateway/gateway.go
@@ -106,6 +106,10 @@ func (gw *Gateway) mapIgnores() {
func (gw *Gateway) getDestChannel(msg *config.Message, dest string) []string {
channels := gw.ChannelsIn[msg.Account]
+ // broadcast to every out channel (irc QUIT)
+ if msg.Event == config.EVENT_JOIN_LEAVE && msg.Channel == "" {
+ return gw.ChannelsOut[dest]
+ }
for _, channel := range channels {
if channel == msg.Channel {
return gw.ChannelsOut[dest]
@@ -118,6 +122,10 @@ func (gw *Gateway) handleMessage(msg config.Message, dest *bridge.Bridge) {
if gw.ignoreMessage(&msg) {
return
}
+ // only relay join/part when configged
+ if msg.Event == config.EVENT_JOIN_LEAVE && !gw.Bridges[dest.Account].Config.ShowJoinPart {
+ return
+ }
originchannel := msg.Channel
channels := gw.getDestChannel(&msg, dest.Account)
for _, channel := range channels {