Oh I could swear I read "chat window" instead of "status window". Well, the answer is the same: "echo $nick" refers to $nick's query window. Use "echo -s $nick".