From c3d45a9f06c7cb1361eed382422493ecf05e3fa8 Mon Sep 17 00:00:00 2001 From: Wim Date: Sat, 17 Jun 2017 17:58:56 +0200 Subject: Do not relay join/part of ourselves (irc). Closes #190 --- bridge/irc/irc.go | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'bridge/irc') 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) } -- cgit v1.2.3