on 1:CLOSE:?:/echo -s you just closed $target query window
This triggers when you close a query window.
on 1:CLOSE:=:/notice $me $nick just left the discussion!
This triggers when a dcc chat session ends, or when you close your chat window manually.
Yup, it seems that /close doesn't fall under the "you closed the window" category.. >:\