From 7eba55f236e7a681e313b2b04704acc6819d17a4 Mon Sep 17 00:00:00 2001 From: Chris Sexton <3216719+chrissexton@users.noreply.github.com> Date: Sat, 7 Jan 2023 20:52:24 -0500 Subject: [PATCH] twitch: add irc disable flag --- plugins/twitch/twitch.go | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/plugins/twitch/twitch.go b/plugins/twitch/twitch.go index ad65a55..b2f2de8 100644 --- a/plugins/twitch/twitch.go +++ b/plugins/twitch/twitch.go @@ -424,7 +424,9 @@ func (p *Twitch) offlineCB(w http.ResponseWriter, r *http.Request) { twitcher.URL = twitcher.url() if ch := p.c.Get("twitch.channel", ""); ch != "" { p.stopped(p.b.DefaultConnector(), ch, twitcher) - p.disconnectBridge(p.b.DefaultConnector(), twitcher) + if p.c.GetBool("twitch.irc", false) { + p.disconnectBridge(p.b.DefaultConnector(), twitcher) + } } } @@ -477,6 +479,8 @@ func (p *Twitch) onlineCB(w http.ResponseWriter, r *http.Request) { twitcher.Game = streams.Data.Streams[0].GameName if ch := p.c.Get("twitch.channel", ""); ch != "" { p.streaming(p.b.DefaultConnector(), ch, twitcher) - p.connectBridge(p.b.DefaultConnector(), ch, twitcher) + if p.c.GetBool("twitch.irc", false) { + p.connectBridge(p.b.DefaultConnector(), ch, twitcher) + } } }