i find it better to use code of Codemastr, since yours just spams a screen with multiply rows....
code:
ON *:DNS:{
if ($dns(0) == 0) {
echo $color(other) -ts Unable to resolve $iif($iaddress,$iaddress,$dns(0).addr)
}
else {
var %numhosts $dns(0), %host = 0
var %hosts
while (%host < %numhosts) {
inc %host 1
set %hosts %hosts $iif($dns(1) == $dns(1).ip,$dns(%host).addr $+([,$ccode($dns(%host).addr),]),$dns(%host).ip) $+ $chr(44)
}
echo $color(other) -ts Resolved $dns(1) to $left(%hosts,$calc($len(%hosts)-1))
}
halt
}
Result:
Resolved
www.microsoft.com to 207.46.134.157, 207.46.134.189, 207.46.134.221, 207.46.249.29, 207.46.249.189, 207.46.249.221
and all you get in 1 line.
all credits goes to Codemastr
http://www.unrealircd.com