instead of doing query $nick you could just do .msg $nick. it will pm them without opening a pm window