Rumie, you're missing a part of the on open code.
You used:
on *:open:*: { }
It should be:
on *:open:*:*: { }
First * is level, second is name of the window, third is type of window.
Or, in the case of only wanting it for DCC, you can use:
on *:open:*:=: { }
As far as what even triggered the DCC window, I'm not sure I understand what you're meaning. Do you have an example?