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

(List of ON Events in mIRC (alphabetized))
Line 1: Line 1:
 +
{{mIRC|Guide}}
 +
= Synopsis =
 +
 +
All events share a common syntax:
 +
 +
<source lang="mIRC">
 +
on <prefixes><level>:EVENT:param1:param2:paramN:{
 +
  command
 +
}
 +
</source>
 +
 +
== Levels ==
 +
 +
Levels in mIRC are assigned both to an user and to an event. The purpose is to limit the access of an event to user.
 +
 +
The default access level is 1, this can be changed with {{mIRC|/dlevel}} or in the Options item in the menu of the script editor to allow unlisted users to access
 +
 +
The number of parameters varies from event to event.
 +
 +
== List of event <prefixes>  ==
 +
 +
Event prefixes allow you to change the way mIRC will trigger the event, by adding extra conditions.
 +
 +
Event Prefixes are to be used right before the <level> parameter of an event
 +
 +
=== me ===
 +
 +
The me prefix means that the event must be triggered by you, literally, this is the same as having if ($nick == $me) on top of the event body.
 +
 +
'''Note''': You must seperate the me prefix from the <level> parameter and from the others prefixes with a semi-colon ':'.
 +
 +
=== + ===
 +
 +
The + prefix indicates that the nickname must have that level set, an user with level 10 can't acccess an event with +5.
 +
 +
=== * ===
 +
 +
The * prefix indicates that any user can trigger the event, regardless of their access level (also if they don't have one)
 +
 +
This event prefix is what you want to use in general, any event unrelated to the IRC server should use the * event prefix.
 +
 +
=== ! ===
 +
 +
The ! prefix means the event must not be triggerd by you (opposite of the me prefix).
 +
 +
=== @ ===
 +
 +
The & prefix means the event won't be trigger if a previous script used /halt or /haltdef to halt the default processing of the event inside an event, {{mIRC|$halted}} return $true/$false depending on if a previous script halted default processing.
 +
 +
=== $ ===
 +
 +
The $ prefix means the matchtext parameter of an event (if applicable) is a regular expression
 +
 +
=== ===
 
== List of [[on events - mIRC|ON Events]] in [[mIRC]] (alphabetized) ==
 
== List of [[on events - mIRC|ON Events]] in [[mIRC]] (alphabetized) ==
 
{| id="mp-langs1" style="margin:4px 0 0 0; width:70%; background:none; border-spacing: 0px;"
 
{| id="mp-langs1" style="margin:4px 0 0 0; width:70%; background:none; border-spacing: 0px;"

Revision as of 19:52, 23 July 2014

Guide

Synopsis

All events share a common syntax:

on <prefixes><level>:EVENT:param1:param2:paramN:{
  command
}

Levels

Levels in mIRC are assigned both to an user and to an event. The purpose is to limit the access of an event to user.

The default access level is 1, this can be changed with /dlevel or in the Options item in the menu of the script editor to allow unlisted users to access

The number of parameters varies from event to event.

List of event <prefixes>

Event prefixes allow you to change the way mIRC will trigger the event, by adding extra conditions.

Event Prefixes are to be used right before the <level> parameter of an event

me

The me prefix means that the event must be triggered by you, literally, this is the same as having if ($nick == $me) on top of the event body.

Note: You must seperate the me prefix from the <level> parameter and from the others prefixes with a semi-colon ':'.

+

The + prefix indicates that the nickname must have that level set, an user with level 10 can't acccess an event with +5.

*

The * prefix indicates that any user can trigger the event, regardless of their access level (also if they don't have one)

This event prefix is what you want to use in general, any event unrelated to the IRC server should use the * event prefix.

!

The ! prefix means the event must not be triggerd by you (opposite of the me prefix).

@

The & prefix means the event won't be trigger if a previous script used /halt or /haltdef to halt the default processing of the event inside an event, $halted return $true/$false depending on if a previous script halted default processing.

$

The $ prefix means the matchtext parameter of an event (if applicable) is a regular expression

List of ON Events in mIRC (alphabetized)