Project

General

Profile

Down For Everyone Or Just Me -> Check if your website is down or up?

Added by Mr. BS about 4 years ago

Script to return the response from http://isup.me / http://downforeveryoneorjustme.com/.

Output

<Me> !isup adiirc.com
<Bot> It's just you. http://adiirc.com is up.
<Me> !isup mirc.net
<Bot> It's not just you! http://mirc.net looks down from here.
<Me> !isup blableblibloblu
<Bot> Huh? http://blableblibloblu doesn't look like a site on the interwho.

Script

on *:Text:!isup &:#: {
  if ($sock(isup)) sockclose isup
  sockopen isup isup.me 80
  sockmark isup # $strip($2)
}
on *:sockopen:isup:{
  sockwrite -n $sockname GET / $+ $gettok($sock($sockname).mark,2,32) HTTP/1.1
  sockwrite -n $sockname Host: $sock($sockname).addr
  sockwrite -n $sockname
}
on *:sockread:isup:{
  var %isupreader
  sockread %isupreader
  if ($regex(%isupreader,/(Huh.+|It'.+)/)) {
    msg $gettok($sock($sockname).mark,1,32) $nohtml($regml(1))
  }
}
alias nohtml {
  return $decode($regsubex($1,/<.+?>/g,\t),h)
}