Advertisement
westor

!uptime twitch script v1.0 for tovello

Aug 28th, 2019
558
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 0.69 KB | None | 0 0
  1. ON *:TEXT:!uptime:#: {
  2.   if (%flood_uptime) || ($($+(%,flood_uptime_,$nick),2)) { return }
  3.   set -eu6 %flood_uptime On
  4.   set -eu3 %flood_uptime_ $+ $nick On
  5.  
  6.   if ($regex($msgtags(display-name).key, /^[a-z\d_]+$/ig)) { var %output = msg $chan /me @ $+ $msgtags(display-name).key }
  7.   else { var %output = msg $chan /me @ $+ $nick }
  8.  
  9.   var %v = UPTIME_ $+ $ticks $+ $ctime
  10.  
  11.   JSONOpen -Ud %v https://decapi.me/twitch/uptime?channel=monstercat
  12.   if ($jsonerror) { %output Error! Connection Problem! - Error Details: $jsonerror | return }
  13.  
  14.   var %d = $json(%v).httpbody
  15.  
  16.   if (!%d) { %output Error! Connection Reading Problem! - Error Details: $json(%v).error }
  17.   else { %output Uptime: %d }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement