You can use the following identifiers in scripts to refer to values relating specifically to events. There are also quite a few other identifiers which relate only to specific events, these are described with the events themselves in other parts of the help file. There are also other identifiers which can be used in both remote and non-remote scripts.
You can use the $1 $2 ... $N identifiers to refer to individual parameters in a line. You can also use $N- to refer to parameters N and onwards, and $N-M to refer to parameters $N through to $M. So to refer to a whole line, you would use $1-.
Returns the number of space-delimited tokens in the $1- line.
This identifier can only be used in the text match section of an event definition. It allows you to create a match parameter dynamically. You can use $1- to reference the incoming line.
on 1:TEXT:$(*hello $me $+ *):?:echo hello back!
Returns the address of the user associated with an event in the form user@host.
Returns the name of the channel for a specific event. For all non-channel events $chan will be $null.
Returns the matching event level for a triggered event.
Returns the current default user level.
Returns the name of the event that was triggered.
Returns a unique value to identify the event that can be used, for example, in SendMessage().
Returns the full address of the user triggering an event in the form nick!user@host.
Returns the name or status of a #group in a script.
Properties: status, name, fname
$group(0) returns the number of groups
$group(1) returns the name of the first group
$group(1).status returns on or off for the first group
$group(#test) returns on or off for group #test
$group(#test).fname returns the script filename in which the group exists
$group(3).name returns the name of the 3rd group
Returns the address that was matched for the triggered event.
Returns wildcard matchtext that was used in the matching remote event.
Returns the Nth nick affected by a channel mode change.
Properties: op, deop, ban, unban, voice, devoice, help, dehelp
The properties can be used to specify which type of mode change you want to check.
$mode(0).op returns the number of opped nicks
$mode(1).op returns the first opped nick
Note: This identifier is only used in conjunction with the on OP/DEOP etc. events.
Returns the nickname of the user associated with an event.
Returns the numeric for the matching numeric event.
Returns raw server line for server events prior to any parsing/decoding
Returns raw server line for server events.
Returns a bitwise integer indicating if ctcps/events/raws are enabled.
if ($remote & 1) echo ctcps are enabled
if ($remote & 2) echo events are enabled
if ($remote & 4) echo raws are enabled
Returns the filename of the currently executing remote script.
Returns the filename for the Nth loaded script file. If you specify a filename, it returns $null if the file is not loaded.
$script(0) return the number of script files loaded
$script(2) returns the filename of the 2nd loaded script file
$script(moo.txt) returns $null if the file is not loaded, or moo.txt if it is.
Note: This cannot be used to reference the users or variables files.
Returns the directory of the currently executing remote script.
Returns line number in current script.
Returns the portion of $address after the @ for the user associated with an event in the form user@host.
Returns the target of an event.
Returns the user level that was matched for the currently triggered event.
Returns the Nth address in the Users list that matches the specified address and level.
You can specify a wildcard address or a * to match any address in the user list. If you do not specify a full address, it completes the address with wildcards. If you do not specify N, the first matching address is returned.
If you specify L, only matching addresses that contain the specified level are returned.
Note: L and N are optional, but if you specify L, you must specify N.
Returns the address of the user who triggered an event in the form *!*@host.