That looks like it's part of an MTS theme, so I wouldn't change that too much if I were you, but if you're using it stand alone you can make it much shorter:

Code:
on &*:DNS:{
  if ($dns(0)) {
    var %i = 1, %t = $dns(0)
    while (%i <= %t) {
      echo $color(info) -ti2 $+ $iif(($_isactive) && (@* !iswm $active), a, s) 10.... 11Resolved 15~» 14 $+ $iif(($remtok($dns(%i).ip $dns(%i).addr, $dns(%i), 1, 32) == $dns(%i).ip), $dns(%i).addr, $dns(%i).ip) $+ 15~» 11To 15~» 07 $+ $remtok($dns(%i).ip $dns(%i).addr, $dns(%i), 1, 32) $+  | haltdef
      inc %i
    }
  }
}