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

m (Bot: Automated text replacement (-Added On:.+\n?\n?\n?\n?\n? +))
m (Compatibility: This was added in 5.02)
 
(8 intermediate revisions by 3 users not shown)
Line 1: Line 1:
The '''ON DISCONNECT''' event triggers when mIRC has disconnected from an IRC server. The '''$1-''' identifier is filled with any server disconnect message that is passed to mIRC.
+
{{mirc title|On Disconnect - Events}}
 +
The '''ON DISCONNECT''' event triggers when mIRC has disconnected from an IRC server.
  
 
== Synopsis ==
 
== Synopsis ==
Line 5: Line 6:
  
 
== Parameters ==
 
== Parameters ==
<span style="display: inline-block; width: 105px;">'''<level>'''</span>The level for the event to trigger.
+
* '''<level>''' - The corresponding {{mIRC|access levels}} for the event to trigger.
  
<span style="display: inline-block; width: 105px;">'''<commands>'''</span>The commands to be performed when the event listener's criteria is met.
+
* '''<commands>''' - The commands to be performed when the event listener's criteria is met.
 +
 
 +
== {{mIRC|local identifiers}} ==
 +
 
 +
=== {{mIRC|$N|$1-}} ===
 +
 
 +
Returns the server disconnect message that is passed to mIRC.
  
 
== Examples ==
 
== Examples ==
Line 20: Line 27:
  
 
== Compatibility ==
 
== Compatibility ==
Added: mIRC v2.1a
+
{{mIRC compatibility|5.02}}
  
 
== See Also ==
 
== See Also ==
Line 29: Line 36:
 
{{mIRC on event list}}
 
{{mIRC on event list}}
  
[[Category:MIRC on events]]
+
[[Category:mIRC on events|disconnect]]

Latest revision as of 18:21, 9 February 2024

The ON DISCONNECT event triggers when mIRC has disconnected from an IRC server.

Synopsis[edit]

ON <level>:DISCONNECT:<commands>

Parameters[edit]

  • <level> - The corresponding access levels for the event to trigger.
  • <commands> - The commands to be performed when the event listener's criteria is met.

local identifiers[edit]

$1-[edit]

Returns the server disconnect message that is passed to mIRC.

Examples[edit]

; Echo network, and time
; when mIRC disconnected
ON *:DISCONNECT:echo -a Disconnected from $network on $asctime(dddd mmmm $+(ddoo,$chr(44), yyyy)) at $asctime(hh:mmtt) $+ . Server disconnect reason: $1-

The following is an example of what will be displayed when mIRC has disconnected from a server:

Disconnected from DALnet on Tuesday June 24th, 2014 at 02:06pm.

The $asctime identifier has been used here in order to specifically format the current date and time.

Compatibility[edit]

Added: mIRC v5.02
Added on: 21 Apr 1997
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also[edit]