From WikiChip
Difference between revisions of "mirc/on events/on sockclose"
< mirc‎ | on events

(Example)
Line 1: Line 1:
The '''ON SOCKCLOSE''' event triggers when a [[Sockets - mIRC|TCP socket]] connection is closed by the remote host.
+
The '''ON SOCKCLOSE''' event triggers when a {{mIRC|/Sockets#mIRC_Sockets|TCP socket]] connection is closed by the remote host.
  
 
== Synopsis ==
 
== Synopsis ==

Revision as of 20:17, 26 July 2014

The ON SOCKCLOSE event triggers when a {{mIRC|/Sockets#mIRC_Sockets|TCP socket]] connection is closed by the remote host.

Synopsis

ON <level>:SOCKCLOSE:<name>:<commands>

Parameters

<level>The level for the event to trigger.

<matchtext>The name of the target socket. Can be a wildcard.

<commands>The commands to be performed when the event listener's criteria is met.

Example

When the socket closes, echo that the socket has closed and some details about it to the active window:

ON *:SOCKCLOSE:*: {
  echo -a ::=> $sockname Connection to $sock($sockname).ip on port $sock($sockname).port closed by the remote host!
}

Compatibility

Added: mIRC v6.14
Added on: 03 Mar 2004
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also