Twitch.tv stream checker script
(Credits to SReject for $JSON script -> http://hawkee.com/snippet/10194/)
Requested for: http://forums.mirc.com/ubbthreads.php/topics/248313/%28TWITCH_RELATED%29_Checking_if_c#Post248313
Contact: http://westor.ucoz.com/contact
Commands:
!tstream = Will search on the website for this user stream if it is online or not and will give some details.
NOTE: Due an hawkee parser problem you can get the code from here: http://pastebin.com/ELS7ge60
http://pastebin.com/ELS7ge60
New link: http://pastebin.com/ELS7ge60
Love this code but i saw a small flaw but fixed it on my end. not sure if it does it for anyone else. One line 21 you have this
elseif (%id) { .msg $2 0,6Twitch: -> Stream: 2 $+ $3 $+ -=- Status: 3Online -=- Viewer(s): 9 $+ $iif(%viewers,$v1,N/A) $+ -=- Created on: 10 $+ $iif(%crdate,$v1,N/A) $+ (7 $+ $iif(%timeago,$v1,N/A) $+ ) }
When i went to check on lethalfrag it said this as a reponse
0,6Twitch: -> Stream: 2lethalfrag-=- Status: 3Online -=- Viewer(s): 93,714-=- Created on: 102014-10-13 02:01:32(72 hours ago)
To fix that i got rid of some un-needed values to fix that. The code is now this:
elseif (%id) { .msg $2 Twitch: -> Stream: $+ $3 $+ -=- Status: Online -=- Viewer(s): $+ $iif(%viewers,$v1,N/A) $+ -=- Live since: $+ $iif(%crdate,$v1,N/A) $+ ( $+ $iif(%timeago,$v1,N/A) $+ ) }
As i type this lethalfrag just logged off so tested another stream. Here are the results of this fix
Twitch: -> Stream:saltybet-=- Status: Online -=- Viewer(s):346-=- Live since:2014-10-12 22:02:29(6 hours ago)
As you can tell it has a little cleaner response with the same format you originally intended to use.
One small note is on line 20 it says
The $qt($3) stream channel is currently 4OFFLINE
Change it to
The $qt($3) stream channel is currently OFFLINE
There was an problem you can copy the new paste from here: http://pastebin.com/aax3iAKh
Problem fixed please copy the new code from here: http://pastebin.com/aax3iAKh