Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- bind pub - !website webserver_up
- proc webserver_up { nick host handle chan {text ""} } {
- set webhost [lindex $text 0]
- if { [catch {socket $webhost 80} msg] } {
- # some error occured and msg holds the error message
- puthelp "PRIVMSG $chan :$nick, website is down!"
- } else {
- # all is ok and msg holds the result of the command
- puthelp "PRIVMSG $chan :$nick, website is up."
- }
- }
Add Comment
Please, Sign In to add comment