This is the new home of the egghelp.org community forum.
All data has been migrated (including user logins/passwords) to a new phpBB version.


For more information, see this announcement post. Click the X in the top right-corner of this box to dismiss this message.

check if site down

Requests for complete scripts or modifications/fixes for scripts you didn't write. Response not guaranteed, and no thread bumping!
Post Reply
s
sdays
Halfop
Posts: 98
Joined: Sat Oct 21, 2006 4:46 am

check if site down

Post by sdays »

Hi all, I was wondering if any of ya know if there is a script to check if a site down for my bot..
User avatar
DragnLord
Owner
Posts: 711
Joined: Sat Jan 24, 2004 4:58 pm
Location: C'ville, Virginia, USA

Post by DragnLord »

This will check for websites

Code: Select all

# Usage example: !sitetest egghelp.org
bind pub - !sitetest site:test
proc site:test {n u h c a} {
 if {[catch {set site_test [socket -async $a 80]} sockerr]} {
   putserv "privmsg $c :$a is Down"
   } else {
   putserv "privmsg $c :$a is Up"
 }
 if {[info exist site_test]} {close $site_test}
}
putlog "Site Test loaded.."
Post Reply