mirror of https://github.com/velour/catbase.git
twitch: add irc disable flag
This commit is contained in:
parent
f70eb46c5d
commit
7eba55f236
|
@ -424,9 +424,11 @@ func (p *Twitch) offlineCB(w http.ResponseWriter, r *http.Request) {
|
||||||
twitcher.URL = twitcher.url()
|
twitcher.URL = twitcher.url()
|
||||||
if ch := p.c.Get("twitch.channel", ""); ch != "" {
|
if ch := p.c.Get("twitch.channel", ""); ch != "" {
|
||||||
p.stopped(p.b.DefaultConnector(), ch, twitcher)
|
p.stopped(p.b.DefaultConnector(), ch, twitcher)
|
||||||
|
if p.c.GetBool("twitch.irc", false) {
|
||||||
p.disconnectBridge(p.b.DefaultConnector(), twitcher)
|
p.disconnectBridge(p.b.DefaultConnector(), twitcher)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
func (p *Twitch) onlineCB(w http.ResponseWriter, r *http.Request) {
|
func (p *Twitch) onlineCB(w http.ResponseWriter, r *http.Request) {
|
||||||
body, err := io.ReadAll(r.Body)
|
body, err := io.ReadAll(r.Body)
|
||||||
|
@ -477,6 +479,8 @@ func (p *Twitch) onlineCB(w http.ResponseWriter, r *http.Request) {
|
||||||
twitcher.Game = streams.Data.Streams[0].GameName
|
twitcher.Game = streams.Data.Streams[0].GameName
|
||||||
if ch := p.c.Get("twitch.channel", ""); ch != "" {
|
if ch := p.c.Get("twitch.channel", ""); ch != "" {
|
||||||
p.streaming(p.b.DefaultConnector(), ch, twitcher)
|
p.streaming(p.b.DefaultConnector(), ch, twitcher)
|
||||||
|
if p.c.GetBool("twitch.irc", false) {
|
||||||
p.connectBridge(p.b.DefaultConnector(), ch, twitcher)
|
p.connectBridge(p.b.DefaultConnector(), ch, twitcher)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
Loading…
Reference in New Issue