daily pastebin goal
27%
SHARE
TWEET

Untitled

a guest May 16th, 2018 158 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top