Remote Identifiers

 

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.

 

$1-

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-.

 

$0

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!

 

$address

Returns the address of the user associated with an event in the form user@host.

 

$chan

Returns the name of the channel for a specific event. For all non-channel events $chan will be $null.

 

$clevel

Returns the matching event level for a triggered event.

 

$dlevel

Returns the current default user level.

 

$event

Returns the name of the event that was triggered.

 

$eventid

Returns a unique value to identify the event that can be used, for example, in SendMessage().

 

$fulladdress

Returns the full address of the user triggering an event in the form nick!user@host.

 

$group(N/#)

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

 

$maddress

Returns the address that was matched for the triggered event.

 

$matchkey

Returns wildcard matchtext that was used in the matching remote event.

 

$mode(N)

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.

 

$nick

Returns the nickname of the user associated with an event.

 

$numeric

Returns the numeric for the matching numeric event.

 

$rawbytes

Returns raw server line for server events prior to any parsing/decoding

 

$rawmsg

Returns raw server line for server events.

 

$remote

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

 

$script

Returns the filename of the currently executing remote script.

 

$script(N/filename)

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.

 

$scriptdir

Returns the directory of the currently executing remote script.

 

$scriptline

Returns line number in current script.

 

$site

Returns the portion of $address after the @ for the user associated with an event in the form user@host.

 

$target

Returns the target of an event.

 

$ulevel

Returns the user level that was matched for the currently triggered event.

 

$ulist(nick!userid@address,L,N)

Returns the Nth address in the Users list that matches the specified address and level.

 

Properties: info

 

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.

 

$wildsite

Returns the address of the user who triggered an event in the form *!*@host.