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

Line 1: Line 1:
 
{{mIRC Guide}}
 
{{mIRC Guide}}
The '''ON ERROR''' event is triggered when an [[Server - IRC|IRC Server]] sends an error message, most-likely a disconnect message.
+
The '''ON ERROR''' event is triggered when an server sends an error message, most-likely a disconnect message.
 
 
This event fills the '''$1-''' identifier with the entire error message.
 
  
 
== Synopsis ==
 
== Synopsis ==
Line 11: Line 9:
 
* '''<matchtext>''' - The corresponding {{mIRC|on text|matchtext}} for the event to trigger.
 
* '''<matchtext>''' - The corresponding {{mIRC|on text|matchtext}} for the event to trigger.
 
* '''<commands>''' - The commands to be performed when the event triggers
 
* '''<commands>''' - The commands to be performed when the event triggers
 +
 +
== {{mIRC|local identifiers}} ==
 +
 +
=== {{mIRC|$N|$1-}} ===
 +
 +
Returns the error message.
  
 
== Example ==
 
== Example ==

Revision as of 16:57, 9 February 2016

Template:mIRC Guide The ON ERROR event is triggered when an server sends an error message, most-likely a disconnect message.

Synopsis

ON <level>:ERROR:<matchtext>:<commands>

Parameters

  • <level> - The corresponding access levels for the event to trigger.
  • <matchtext> - The corresponding matchtext for the event to trigger.
  • <commands> - The commands to be performed when the event triggers

local identifiers

$1-

Returns the error message.

Example

This example will trigger if the response full is in the server-returned error:

ON *:ERROR:*full*:echo -s This server is most-likely full. Server sent error: $1-

This example triggers if the word ban is within the server error:

ON *:ERROR:*ban*:echo -s You're most-likely banned from this server. Server sent error: $-

Compatibility

Added: mIRC v4.7
Added on: 09 Dec 1996
Note: Unless otherwise stated, this was the date of original functionality.
Further enhancements may have been made in later versions.


See Also