This is a simple dns lookup script.
paste it in remotes then type !dns IP/DOMAIN/HOSTNAME
EX: !dns google.com
:D
on *:TEXT:*:*: {
if ($1 == !dns) {
set %dnsnick $nick
set %dnschan $chan
set %dns $2
sockopen dns baremetal.com 80
}
}
on *:sockopen:dns: {
sockwrite -n $sockname GET /cgi-bin/dnsip?target= $+ %dns HTTP/1.1
sockwrite -n $sockname Host: baremetal.com $+ $crlf $+ $crlf
}
on *:sockread:dns: {
if ($sockerr) {
msg %dnschan Error.
sockclose dns
halt
}
else {
var %dnsread
sockread %dnsread
}
if (%dns isin %dnsread) && (<b> isin %dnsread) && (</b> <br> isin %dnsread) {
if (<b></b> <br> !isin %dnsread) {
msg %dnschan $+ %dns $+ -> $+ $htmlfree(%dnsread) $+
sockclose dns
halt
}
else {
msg %dnschan $+ %dns $+ Does not Resolve.
}
}
}