Guest User

Untitled

a guest
May 16th, 2018
220
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
TCL 0.47 KB | None | 0 0
  1. bind pub - !website webserver_up
  2. proc webserver_up { nick host handle chan {text ""} } {
  3.     set webSock [socket hej.zeracca.net 80]
  4.     set rc [catch {$webSock} msg]
  5.     if {$rc == 1} {
  6.       # all is ok and msg holds the result of the command
  7.       puthelp "PRIVMSG $chan :$nick, website is up."
  8.     } else {
  9.       # some error occured and msg holds the error message
  10.       puthelp "PRIVMSG $chan :$nick, website is down! returning $rc"
  11.     }
  12.  
  13.     close $webSock
  14.  
  15. }
Add Comment
Please, Sign In to add comment