From WikiChip
Difference between revisions of "mirc/on events/on error"
(Created On error event - mIRC) |
(→Example) |
||
Line 14: | Line 14: | ||
== Example == | == Example == | ||
+ | This example will trigger if the response ''full'' is in the server-returned error: | ||
<source lang="mIRC">ON *:ERROR:*full*:echo -s This server is most-likely full. Server sent error: $1-</source> | <source lang="mIRC">ON *:ERROR:*full*:echo -s This server is most-likely full. Server sent error: $1-</source> | ||
+ | This example triggers if the word ''ban'' is within the server error: | ||
<source lang="mIRC">ON *:ERROR:*ban*:echo -s You're most-likely banned from this server. Server sent error: $-</source> | <source lang="mIRC">ON *:ERROR:*ban*:echo -s You're most-likely banned from this server. Server sent error: $-</source> | ||
Revision as of 00:04, 25 June 2014
The ON ERROR event is triggered when an IRC Server sends an error message, most-likely a disconnect message.
This event fills the $1- identifier with the entire error message.
Synopsis
ON <level>:ERROR:<matchtext>:<commands>
Parameters
<level>The level for the event to trigger.
<matchtext>The text that to be matched. Can also be a wildcard.
<commands>The commands to be performed when the event listener's criteria is met.
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/12/96