Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- ON !*:TEXT:!uptime:#: {
- var %s = upt_ $+ $ticks $+ $rand(1,1000000)
- if ($sock(%s)) { sockclose %s }
- sockopen %s nightdev.com 80
- sockmark %s $nick $chan
- }
- ON *:SOCKOPEN:upt_*: {
- if ($sockerr) {
- var %n = $gettok($sock($sockname).mark,1,32)
- var %c = $gettok($sock($sockname).mark,2,32)
- if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): Error, There was an connection opening error to the nightdev.com website! }
- sockclose $sockname
- return
- }
- sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ $remove($gettok($sock($sockname).mark,2,32),$chr(35)) HTTP/1.1
- sockwrite -n $sockname Host: $sock($sockname).addr
- sockwrite -n $sockname User-Agent: */*
- sockwrite -n $sockname Connection: close
- sockwrite -n $sockname $crlf
- }
- ON *:SOCKREAD:upt_*: {
- if ($sockerr) {
- var %n = $gettok($sock($sockname).mark,1,32)
- var %c = $gettok($sock($sockname).mark,2,32)
- if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): Error, There was an connection reading error to the nightdev.com website! }
- sockclose $sockname
- return
- }
- var %r
- sockread %r
- var %n = $gettok($sock($sockname).mark,1,32)
- var %c = $gettok($sock($sockname).mark,2,32)
- if (*channel is not* iswm %r) { .msg %c ( $+ %n $+ ): $remove(%c,$chr(35)) Uptime: The channel is NOT live! | sockclose $sockname }
- if ($chr(44) !isin %r) && (*minutes* iswm %r) || (*seconds* iswm %r) { .msg %c ( $+ %n $+ ): $remove(%c,$chr(35)) Uptime: %r }
- if (*date* !iswm %r) && ($chr(44) isin %r) {
- if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): $remove(%c,$chr(35)) Uptime: %r }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement