package require http
#bind pub - !status pub:neo_check
#bind time - "15 * * * *" pub:neo_check
#bind pubm - "*" pub:neo_check
proc pub:neo_check {nick host handle chan text} {
global botnick showtimechans
#set statx [http::geturl http://www.neopets.com/objects.phtml]
set statx [http::geturl http://www.dubloon.com/test.php]
set data [http::data $statx]
set var "<font size=5>Neopets is down for maintenance

set x 0
foreach content [split $data \n] {
if [string match "*$var*" $content] {set x 1}
}
if {$x == 1} {
putserv "NOTICE Xolite : \002 *Neopian Alert: http://www.Neopets.com is Down For Maintenance

putlog "Neopets.com Status is Down For Maintenance"
} else {
if {$x == 0} {
putserv "NOTICE Xolite :\002 *Attention Neopians: http://www.Neopets.com/ Is Back Up and Running\002 - Have Fun!"
putlog "Neopets.com Status is OK"
return 0
}
}
timer 1 pub:neo_check
return 1
}