$(...): Difference between revisions

From Scriptwiki
Jump to navigation Jump to search
removed incorrect note
m Added note about using $() to evaluate other identifers.
Line 9: Line 9:
  }
  }
This example will echo to your active window whenever someone mentioned your nickname.
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) *:#: { ... }''


== See also ==
== See also ==
* [[$eval]]
* [[$eval]]
[[Category:Remote Identifiers]]
[[Category:Remote Identifiers]]

Revision as of 09:54, 26 January 2008

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) *:#: { ... }

See also