$(...) (events)

From Scriptwiki
Revision as of 01:09, 11 July 2013 by Jay2k1 (talk | contribs) (Created page with "This identifier allows you to create a dynamic match parameter in an event. $(...) You can use $1- to reference the incoming line. == Example == On *:TEXT:...")

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

This identifier allows you to create a dynamic match parameter in an event.

$(...)

You can use $1- to reference the incoming line.

Example

On *:TEXT:$(* $+ $me $+ *):#: {
 echo -a $nick just mentioned your nickname in $chan $+ .
}

This example will echo to your active window whenever someone mentioned your nickname.

Note

You must use $(...) in the match text event for all other identifiers to be evaluated.

Correct:
on *:text:$(hello $me *):#: { ... }
Incorrect:
on *:text:hello $($me) *:#: { ... }

$(...) is an alias of $eval. See the $eval page for more information on how it is used.

See also