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>
This commit is contained in:
Kyle Henfrey 2024-02-13 12:33:03 +00:00 committed by GitHub
parent 6e62c30d68
commit 1f31c9b063
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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)