egghelp.org community Forum Index
[ egghelp.org home | forum home ]
egghelp.org community
Discussion of eggdrop bots, shell accounts and tcl scripts.
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

check if site down

 
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests
View previous topic :: View next topic  
Author Message
sdays
Halfop


Joined: 21 Oct 2006
Posts: 98

PostPosted: Mon Apr 14, 2008 7:16 pm    Post subject: check if site down Reply with quote

Hi all, I was wondering if any of ya know if there is a script to check if a site down for my bot..
Back to top
View user's profile Send private message
DragnLord
Owner


Joined: 24 Jan 2004
Posts: 711
Location: C'ville, Virginia, USA

PostPosted: Tue Apr 15, 2008 12:10 am    Post subject: Reply with quote

This will check for websites
Code:
# 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.."
Back to top
View user's profile Send private message
Display posts from previous:   
Post new topic   Reply to topic    egghelp.org community Forum Index -> Script Requests All times are GMT - 4 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Forum hosting provided by Reverse.net

Powered by phpBB © 2001, 2005 phpBB Group
subGreen style by ktauber