Advertisement
westor

!uptime for Aotik v2

Jan 17th, 2015
398
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
mIRC 1.38 KB | None | 0 0
  1. ON !*:TEXT:!uptime:#: {
  2.   var %s = upt_ $+ $ticks $+ $rand(1,1000000)
  3.   if ($sock(%s)) { sockclose %s }
  4.   sockopen %s nightdev.com 80
  5.   sockmark %s $nick $chan
  6. }
  7.  
  8. ON *:SOCKOPEN:upt_*: {
  9.   if ($sockerr) {
  10.     var %n = $gettok($sock($sockname).mark,1,32)
  11.     var %c = $gettok($sock($sockname).mark,2,32)
  12.     if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): Error, There was an connection opening error to the nightdev.com website! }
  13.     sockclose $sockname
  14.     return
  15.   }
  16.   sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ $gettok($sock($sockname).mark,2,32) HTTP/1.1
  17.   sockwrite -n $sockname Host: $sock($sockname).addr
  18.   sockwrite -n $sockname User-Agent: */*
  19.   sockwrite -n $sockname Connection: close
  20.   sockwrite -n $sockname $crlf
  21. }
  22.  
  23. ON *:SOCKREAD:upt_*: {
  24.   if ($sockerr) {
  25.     var %n = $gettok($sock($sockname).mark,1,32)
  26.     var %c = $gettok($sock($sockname).mark,2,32)
  27.     if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): Error, There was an connection reading error to the nightdev.com website! }
  28.     sockclose $sockname
  29.     return
  30.   }
  31.   var %r
  32.   sockread %r
  33.   var %n = $gettok($sock($sockname).mark,1,32)
  34.   var %c = $gettok($sock($sockname).mark,2,32)
  35.   if (*date* !iswm %r) && ($chr(44) isin %r) || (*minutes* iswm %r) || (*seconds* iswm %r)  {
  36.     if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): RiotGames2 Uptime: %r }
  37.   }
  38. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement