/close -g nick closes ALL dcc get windows with that nick, which is what the OP wants to avoid. Btw, a small suggestion: you can loop through $get($nick,N) instead of $get(N), meaning less iterations.