Ok So change all those "-at" to $iif($query($2),-t $2,-at)
  • echo $iif($query($2),-t $2,-at) --> 1[15Start Whois1]


$iif($query($2),-t $2,-at)
This looks for a query window with $2 (nick) and if found echoes it to there, if not found it echoes to active.