Hello, Hawkee.
Yesterday i was thinking about this idea.
And today i created it.
Example
[18:18] --------------------------------------------------------------
[18:18] Status: 3Online
[18:18] Host: hawkee.com
[18:18] IP: 74.55.211.234
[18:18] Resolved: 74.55.211.234
[18:18] End of /check
[18:18] --------------------------------------------------------------
End of Example.
Note: If there is something broken/doesn't works or can be better just tell it me and i update it.
alias check {
set %site.target $1-
if ($sock(sitecheck)) { sockclose sitecheck }
sockopen sitecheck www.downforeveryoneorjustme.com 80
sockmark sitecheck $$1
}
on *:sockopen:sitecheck: {
sockwrite -n $sockname GET $+(/,$sock(sitecheck).mark) HTTP/1.1
sockwrite -n $sockname Host: www.downforeveryoneorjustme.com
sockwrite -n $sockname Connection: close
sockwrite -n $sockname $crlf
}
on *:sockread:sitecheck: {
set %dns 1
var %x | sockread %x
if (*It's just you* iswm %x) {
set %sitestatus 3Online | dns %site.target
line.dns | echo 3 -at * Status: %sitestatus }
else {
if (*It's not just you!* iswm %x) {
set %sitestatus 4Offline | dns %site.target
line.dns | echo 3 -at * Status: %sitestatus }
}
}
on *:DNS:{
if (%dns == 1) {
set %site.target $naddress
set %site.ip $iaddress
echo 3 -at * Host: $naddress
echo 3 -at * IP: $iaddress
echo 3 -at * Resolved: $raddress
echo 3 -at ***** End of /check *****
line.dns
unset %dns
}
}
alias line.dns {
echo 3 -at --------------------------------------------------------------
}