From d76a04bd0a96772cec5b279aaa1ee45235adc707 Mon Sep 17 00:00:00 2001 From: Wim Date: Sun, 17 Feb 2019 22:43:04 +0100 Subject: Support quits from irc correctly. Fixes #722 (#724) --- bridge/irc/handlers.go | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'bridge/irc') diff --git a/bridge/irc/handlers.go b/bridge/irc/handlers.go index ce4f0445..a5df2d53 100644 --- a/bridge/irc/handlers.go +++ b/bridge/irc/handlers.go @@ -92,6 +92,10 @@ func (b *Birc) handleJoinPart(client *girc.Client, event girc.Event) { return } b.Log.Debugf("<= Sending JOIN_LEAVE event from %s to gateway", b.Account) + // QUIT isn't channel bound, happens for all channels on the bridge + if event.Command == "QUIT" { + channel = "" + } msg := config.Message{Username: "system", Text: event.Source.Name + " " + strings.ToLower(event.Command) + "s", Channel: channel, Account: b.Account, Event: config.EventJoinLeave} b.Log.Debugf("<= Message is %#v", msg) b.Remote <- msg -- cgit v1.2.3