If it's about query windows, alter the code performing the "join-scan" and put it in an "on open" event like:

Code:
on *:open:?:*: {

  ; I just took this piece of code out of RusselB's script, 
  ; and changed the echo-target to be "$nick"

  .hadd -m AKA $address $addtok($hget(AKA,$address),$nick,32)
  if $numtok($hget(AKA,$address),32) > 1 {
    echo 4 $nick $nick aka $replace($remtok($hget(AKA,$address),$nick,1,32),$chr(32),$+($chr(44),$chr(32)))
  }
}

(untested)