Every time I do !viewerupdate, mIRC becomes completely unresponsive. It didn't do this with the other script, I don't understand what is going on. I even moved mIRC to another computer and still the same results. Please help frown Currently this is the only script that works, but it doesn't display the follower count.


Code:
on *:text:*:#: {
  if ($strip($1) == !viewerupdate) {
    if ($strip($2) == $null) {
set %viewerschan $chan
      msg $chan Viewer Update Has Been Started 
      .timer.update 0 60 sayviewers $chan intellibot_v2.0 nightbot wizebot
    }
    if ($strip($2) == off) {
      msg $chan Viewer Update has been stopped
      .timer.update off
    }
  }
}

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 $1 Stream update for $remove(#,$chr(35)) followers: $json(followcount, followers) Viewers: %viewers
}

on *:part:#: {
if ($chan == %viewerschan) {
if ($timer(.update)) {
.timer.update off
}
}
}




This script displays the follower count.

Code:

on *:text:*:#: {
  if ($strip($1) == !streamstatus) {
    if ($strip($2) == $null) {
      sayviewers $chan vector_bot nightbot wizebot

    }
  }
}

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 $1 Stream status for $remove(#,$chr(35)) followers: $json(followcount, followers) Viewers: %viewers
}



Last edited by powerade661; 25/05/15 06:10 AM.