From 1f31c9b0633250b029bfb862193b1f02a306400e Mon Sep 17 00:00:00 2001 From: Kyle Henfrey Date: Tue, 13 Feb 2024 12:33:03 +0000 Subject: [PATCH] feat(irc): disable auto chan part when using bouncer (#1396) * don't part if using bouncer * refactor(irc): move bouncer part logic * refactor(irc): move bouncer part channel logic --------- Co-authored-by: ze0s <43699394+zze0s@users.noreply.github.com> --- internal/irc/handler.go | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/internal/irc/handler.go b/internal/irc/handler.go index 2749667..14dc69c 100644 --- a/internal/irc/handler.go +++ b/internal/irc/handler.go @@ -774,6 +774,12 @@ func (h *Handler) handlePart(msg ircmsg.Message) { // PartChannel parts/leaves channel func (h *Handler) PartChannel(channel string) error { + // if using bouncer we do not want to part any channels + if h.network.UseBouncer { + h.log.Debug().Msgf("using bouncer, skip part channel %s", channel) + return nil + } + h.log.Debug().Msgf("Leaving channel %s", channel) return h.Send("PART", channel)