alias checkIP {
set %danthemandoo.IP $1
if ($sock(ipcheck)) { sockclose ipcheck }
sockopen ipcheck www.dnsstuff.com 80
}
on *:sockopen:ipcheck:{
if (!$sockerr) {
sockwrite -n ipcheck GET /tools/whois.ch?ip= $+ %danthemandoo.ip HTTP/1.1
sockwrite -n ipcheck Host: www.dnsstuff.com
sockwrite -n ipcheck User-Agent: Mozilla/4.0 (compatible; MSIE 6.0; Windows NT 5.1; .NET CLR 1.1.4322)
sockwrite -n ipcheck Accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,video/x-mng,image/png,image/jpeg,image/gif;q=0.2,text/css,*/*;q=0.1..
sockwrite -n ipcheck Accept-Language: en-us,en;q=0.50..
sockwrite -n ipcheck Accept-Encoding: gzip, deflate,compress;q=0.9..
sockwrite -n ipcheck Accept-Charset: ISO-8859-1, utf-8;q=0.66, *;q=0.66
sockwrite -n ipcheck Keep-Alive: 300
sockwrite -n ipcheck Connection: keep-alive
sockwrite -n ipcheck Referer: http://www.dnsstuff.com
sockwrite -n ipcheck $crlf
}
else { echo -a It Broke... }
}
on *:sockread:ipcheck:{
var %b
sockread %b
if (Country:* iswm %b) {
echo -a %danthemandoo.ip = $gettok(%b,2,58)
sockclose ipcheck
}
}