Added in 4.4

on <level>:CLOSING:<|@|*>:<commands>

Trigger when manually closing a custom window. Using /halt cancels the closing.

Parameters

<level> - The User Access Level for the event to trigger.
<@|*> - The Matchtarget to listen to.
<commands> - The commands to be performed when the event listener's criteria is met.

Example

on *:CLOSING:@window:echo -ag @window is closing, prevent the close | halt