Order of alias execution

Post Reply
teker
Posts: 6
Joined: Tue Feb 21, 2017 7:49 pm

Order of alias execution

Post by teker »

Is there a defined order of alias execution if multiple aliases match the input string? I would like to be able to create an "alias of last resort" that intercepts all input for processing before sending it out, but only if another alias hasn't processed it first. I can create an alias with pattern ".*+" to intercept all non-empty lines, but is there any way to guarantee that this alias will be executed after all others?

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Order of alias execution

Post by Vadi »

Yes - aliases are processed in the order they are in the trigger editor, temp aliases are processed in chronological order of creation after them.

Have you looked at http://wiki.mudlet.org/w/Manual:Event_E ... endRequest, maybe that'll help?

teker
Posts: 6
Joined: Tue Feb 21, 2017 7:49 pm

Re: Order of alias execution

Post by teker »

Thanks for the info. I think I'll go with the first idea and make sure my catch-all is at the bottom of the alias list. The event doesn't seem to be the right solution. It seems I'd have to manage state so that I process user-input but ignore send()s generated by triggers or the event itself.

User avatar
Vadi
Posts: 5035
Joined: Sat Mar 14, 2009 3:13 pm

Re: Order of alias execution

Post by Vadi »

You would - in a system, it'd not that difficult, just implement a custom send() method that sets it. With the first solution, you'd have the trouble of keeping it last if others create tempAliases after yours - more hassle I reckon.

Post Reply