priority

When more than one macro is matched by a trigger or hooked event, the following rules are used to select which of the macros will be applied (i.e., have its attributes applied to the text, and its body executed):

So, in the simple case when there are no fall-thrus, the highest priority match is chosen. If there is more than one of the highest priority, one of those is chosen at random.

These priority rules apply even to macros defined or undefined by a macro found during the search. For example, if a mud line triggers a fall-thru macro /foo, and /foo defines a new trigger macro /bar which also matches the line, then /bar may be triggered if it has lower priority than /foo.

A macro's priority is set with /def -p; its fall-thru option is set with /def -F.

Use the /trigger -n command to display a list of the triggers triggers or hooks will match a given string.

See: triggers, hooks, macros, /def


Back to index
Back to tf home page
Copyright © 1995, 1996, 1997, 1998, 1999, 2002, 2003, 2004, 2005, 2006-2007 Ken Keys