Difference between revisions of "On close"

From Scriptwiki
Jump to: navigation, search
 
m
 
(2 intermediate revisions by 2 users not shown)
Line 22: Line 22:
 
This triggers on the close of a query window and sends the nick a message.
 
This triggers on the close of a query window and sends the nick a message.
  
 
on ^*:CLOSE:?: {
 
  [[if]] ($nick == idiot) {
 
  [[halt]]
 
  }
 
}
 
This example triggers ''before'' a query has openend, checks if the nick is ''idiot'' and if it is, halts mirc's process, so that the window wont open at all.
 
 
== See Also ==
 
== See Also ==
To trigger on the opening of a window, take a look at the [[On_open|On open event]].
+
* [[On_open|On open event]] to trigger on the opening of a window.
  
 
[[Category:Events]]
 
[[Category:Events]]

Latest revision as of 09:56, 2 July 2007

The on CLOSE events trigger for various events relating to the closing of a window.

on <level>:CLOSE:<?|@|=|!|*>:<commands>


Read access levels to get more info about the <level> field.

The location where this event occurrs can be either a channel (#), a query (?), a DCC-window (=) or a fileserver-window (!) or everything (*).

Note that in the case of dcc sessions, it is trigger when a dcc connection has closed.

Example

On *:CLOSE:*: {
 echo -s $target was just closed.
}

This example would trigger on every close of a window and echo it to the status window.


on *:CLOSE:?: {
 msg $target I have just closed your query-window, $nick $+ !
}

This triggers on the close of a query window and sends the nick a message.

See Also