I believe the simplist way to achieve the desired effect is to ignore the built in /dns command and use /userhost and /userip. They're all equally useless if the network you're on uses hostmasking, but here's a simple script for /userip and /userhost.
raw 302:*:{
echo -ta *** $gettok($2,1,61) is $right($gettok($2,2,61),$calc($len($gettok($2,2,61)) - 1))
halt
}
raw 340:*:{
echo -ta *** $gettok($2,1,61) is $right($gettok($2,2,61),$calc($len($gettok($2,2,61)) - 1))
halt
}
Throw it in your 'remote' section. Then just type /userhost $nick or /userip $nick and it should give you what you want back. Hope it helps.
-hobo