on *:text:*:#: {
if ($strip($1) == !viewerstatus) {
if ($strip($2) == $null) {
sayviewers $chan zacbot661 nightbot wizebot coolkid661
}
}
}
alias sayviewers {
set %viewers $nick($1,0)
var %v = 1
while (%v <= $nick($1,0)) {
if ($istok($2-,$nick($1,%v),32)) {
dec %viewers 1
}
inc %v
}
JSONOpen -ud followcount https://api.twitch.tv/kraken/channels/ $+ $mid(#, 2-)
msg # Stream status for $remove(#,$chr(35)) Followers: # $json(followcount, followers) Viewers: %viewers
}