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 webSock [socket hej.zeracca.net 80]
- set rc [catch {$webSock} msg]
- if {$rc == 1} {
- # all is ok and msg holds the result of the command
- puthelp "PRIVMSG $chan :$nick, website is up."
- } else {
- # some error occured and msg holds the error message
- puthelp "PRIVMSG $chan :$nick, website is down! returning $rc"
- }
- close $webSock
- }
Add Comment
Please, Sign In to add comment