i have this really strange problem, i've got this code to show like the nick/address and common channels a user has when they query me or i query them, i stumbled on a problem if the user is outside of a channel i couldn't get the address, then solved it by whoising them but hiding it, now i have the problem if someone queries me their text appears before the informarion

Code:
on *:open:?:*:{ %q.a = o | .raw -q whois $nick }
alias query { .query $1- | %q.a = o | .raw -q whois $1 |   .load.switchbar }
alias q.open {
  var %q.cc = $comchan($1,0), %q.c,%q.l = 1
  echo -i25 $1 query opened with ( $+ $1 $+ $iif(%q.addr != $null,$chr(32) $+ $v1) $+ ) | unset %q.addr
  while (%q.l <= %q.cc) { %q.c = %q.c $comchan($1,%q.l) $+ $iif(%q.l != %q.cc,$chr(44)) | inc %q.l }
  echo -i25 $1 you are on %q.cc common channel $+ $iif(%q.cc != 1,s) with $1 $+ $iif(%q.cc > 0,$chr(44) which $iif(%q.cc > 1,are,is) $+ : %q.c)
}
Raw 311:*:{ if (%q.a) { %q.addr = $3 $+ @ $+ $4 | q.open $2 | unset %q.a | halt } | else { | halt } }