alias pbh sockopen pbhUpdate www.pointblankhosting.com 80
on *:SOCKOPEN:pbhUpdate:{
sockwrite -n $sockname GET /boredom/update.txt HTTP/1.1
sockwrite -n $sockname Host: www.pointblankhosting.com
sockwrite -n $sockname Accept: text/plain
sockwrite -n $sockname Pragma: no-cache
sockwrite $sockname $crlf
set -u300 %pbhUpdate.Body $false
}
on *:SOCKREAD:pbhUpdate:{
if ($sockerr) {
echo $color(ctcp) @pbhUpdate Error: $sock($sockname).wserr - $sock($sockname).wsmsg
return
}
var %text
while (1) {
sockread %text
if (!$sockbr) return
if (!%text) set -u300 %pbhUpdate.Body $true
if (%pbhUpdate.Body) && (%text) {
set %Script.Current.Version $gettok(%text, 1, 32)
set %Script.Current.URL $gettok(%text, 2, 32)
linesep -s
echo $color(info2) -sbfirt * Current Version: %Script.Current.Version
echo $color(info2) -sbfirt * Script URL: %Script.Current.URL
linesep -s
sockclose $sockname
unset %pbhUpdate.Body
halt
}
}
}