alias icestriker {
set %icechan $1
sockopen -e decapi decapi.me 443
}
on *:SOCKOPEN:*: {
if ($sockname == decapi) {
sockwrite -nt $sockname GET /twitch/uptime.php?channel=Icestriker HTTP/1.1
sockwrite -nt $sockname Host: decapi.me
sockwrite $sockname $crlf
}
}
on *:SOCKREAD:*: {
if ($sockname == decapi) {
var %decapi
sockread %decapi
while ($sockbr) {
sockread %decapi
}
}
}
on *:sockclose:*: {
if ($sockname == decapi) {
var %decapi
sockread -f %decapi
msg %icechan %decapi
}
}