Type !dns <Ip/Person> and it should work :).
on $*:TEXT:/^[.!@]Dns/Si:#: {
tokenize 32 $strip($1-)
dns $2
set %dns $nick
}
on *:DNS:{
if ($dns(0)) notice %dns 14Dnsing local address:7 $dns(1).addr 14To ip address:4 $dns(1).ip
else notice %dns You have specified an invalid ip/host address.
halt
}