You should also do a /closemsg, else a empty chat window will open, with no messages in it
on ^*:text:*:?: {
if ($nick ison #chan) { .closemsg $nick | halt }
}
Hm.. I've not had a chance to test my code. It either needs halt or haltdef and then it won't even open a window. That's why I didn't include a /window -c $nick command (or /closemsg... tho I prefer using /window for such things). If halt lets the window open, change it to haltdef and it shouldn't open.