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= $+ $gettok($sock($sockname).mark,2,32) 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 not live* iswm %r) { .msg %c ( $+ %n $+ ): %c Uptime: The channel is NOT live! | sockclose $sockname }
- if (*minutes* iswm %r) || (*seconds* iswm %r) { .msg %c ( $+ %n $+ ): %c Uptime: %r | sockclose $sockname }
- if (*date* !iswm %r) && ($chr(44) isin %r) {
- if ($me ison %c) && (%n ison %c) { .msg %c ( $+ %n $+ ): %c Uptime: %r | sockclose $sockname }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement