Alright, so what I have here is the attempt at overturning the changes to hosting recently by Twitch.
I was wondering if it's possible to call specific variables by the alias provided below.
alias targetStatus {
if (!$1) { return }
var %j = targetStatus
JSONOpen -ud %j https://api.twitch.tv/kraken/streams/ $+ $1 $+ ?= $+ $ticks
var %targetStatus = $json(%j,stream)
if (%targetStatus) { set %gTargetStatus Online }
if (!%targetStatus) { unset %gTargetStatus | /timer[TARGET_STATUS] off | msg %hostChan .unhost | unset %host* }
return %targetStatus
}
I want to call that variable on a per channel basis, specifically if this is running in multiple channels so it would have
%hostChan.#chan1 #chan1
%hostChan.#chan2 #chan2
ect.
So I want to check if the host of #chan1 is offline, and it is, so I need to send an .unhost to #chan1.
Can I call specific channels like that?
Also, in my current code (rough form) I'm aware that /unset %host* will unset all the %host variables.
If I can get pointed in the right direction I can make it all work, it's more of an understanding thing on my part.