Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- alias uptime_chan return ENTER-HERE-THE-TWITCH-CHANNEL
- ; change this to your twitch channel (without # in front of the name)
- ; example: starladder5
- ; --- end of settings ----
- ON *:TEXT:!uptime:#: {
- var %c = $chr(35) $+ $uptime_chan
- if (%c == $chan) { uptime }
- }
- alias uptime {
- sockclose uptime
- sockopen uptime nightdev.com 80
- }
- ON *:SOCKOPEN:uptime: {
- if ($sockerr) { sockclose $sockname | halt }
- sockwrite -n $sockname GET /hosted/uptime.php?channel= $+ $uptime_chan HTTP/1.1
- sockwrite -n $sockname Host: $sock($sockname).addr
- sockwrite -n $sockname $crlf
- }
- ON *:SOCKREAD:uptime: {
- if ($sockerr) { sockclose $sockname }
- var %data
- sockread %data
- if ($gettok(%data,1,32) isnum) && ($gettok(%data,2,32)) {
- var %c = $chr(35) $+ $uptime_chan
- if ($me !ison %c) { return }
- .msg %c The streaming is up for $qt(%data) $+ .
- }
- elseif (*not live.* iswm %data) {
- var %c = $chr(35) $+ $uptime_chan
- if ($me !ison %c) { return }
- .msg %c The streaming is currently offline.
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement