/substitute

Function usage:

SUBSTITUTE(text [, attrs [, inline]])

Command usage:

/SUBSTITUTE [-aattrs] [-p] text


When called from a trigger (directly or indirectly), the entire triggering line is replaced with text. After a /substitute, it will appear as if text is what caused the trigger; the original line is lost. In particular, this means when /substitute is called from a fall-thru trigger, triggers of lower priority will be compared against text instead of the original line.

Options and arguments:

command: -aattrs
function: attrs
Give text the attributes described by attrs. These are added to the original line's attributes unless attrs include the "x" attribute.
command: -p
function: inline = "on" or 1
Interpet @{attr} strings as commands to set attributes inline, as in /echo. (See /echo).

Example:

On a mud that uses MUFpage, you could set your #prepend string to "##page>", and define a trigger like:

  /def -ah -t"##page> *" hilite_mufpage = /substitute %-1

This will match no matter what page format the sender uses, and strip off the "##page>" so you never see it.

For another example, see /replace.

See: triggers


Back to index
Back to tf home page
Copyright © 1995 - 1999 Ken Keys