summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorWim <wim@42.be>2017-06-17 17:58:56 +0200
committerWim <wim@42.be>2017-06-17 17:58:56 +0200
commitc3d45a9f06c7cb1361eed382422493ecf05e3fa8 (patch)
treeb74b48398f1140c2bc36b7ecde7f53f5ff3a6508
parentc07b85b625333bc392c9943506a0c7b2e483b989 (diff)
downloadmatterbridge-msglm-c3d45a9f06c7cb1361eed382422493ecf05e3fa8.tar.gz
matterbridge-msglm-c3d45a9f06c7cb1361eed382422493ecf05e3fa8.tar.bz2
matterbridge-msglm-c3d45a9f06c7cb1361eed382422493ecf05e3fa8.zip
Do not relay join/part of ourselves (irc). Closes #190
-rw-r--r--bridge/irc/irc.go7
1 files changed, 5 insertions, 2 deletions
diff --git a/bridge/irc/irc.go b/bridge/irc/irc.go
index 8bb8896e..2e94d30b 100644
--- a/bridge/irc/irc.go
+++ b/bridge/irc/irc.go
@@ -192,8 +192,11 @@ func (b *Birc) handleJoinPart(event *irc.Event) {
return
}
}
- flog.Debugf("Sending JOIN_LEAVE event from %s to gateway", b.Account)
- b.Remote <- config.Message{Username: "system", Text: event.Nick + " " + strings.ToLower(event.Code) + "s", Channel: channel, Account: b.Account, Event: config.EVENT_JOIN_LEAVE}
+ if event.Nick != b.Nick {
+ flog.Debugf("Sending JOIN_LEAVE event from %s to gateway", b.Account)
+ b.Remote <- config.Message{Username: "system", Text: event.Nick + " " + strings.ToLower(event.Code) + "s", Channel: channel, Account: b.Account, Event: config.EVENT_JOIN_LEAVE}
+ return
+ }
flog.Debugf("handle %#v", event)
}