|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Mar 22, 2008 2:27 am
Advice needed on a trigger to avoid an infinite loop |
I'm trying to pattern match when I'm hit with an attack line I've not seen before, so I do this:
^(.*\b(?:@target_full)\b.*)$
So if I see the @target_full anywhere in the line it will match and I know I've seen an unrecorded attack. I'd like to do a sub on the line so it looks nicer but if I try to sub/say/show or anything that uses the name again the trigger will go into an infinite loop where it matches then prints out the name again and matches again. I tried selecting, "stop further processing" which I thought would have solved it, but it didn't.
Any advice? |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Mar 22, 2008 2:33 am |
Try calling an alias from the trigger, the first thing the alias does is disable said trigger. That means, though, you need an activating alias also.
|
|
_________________ Sic itur ad astra. |
|
|
|
ReedN Wizard
Joined: 04 Jan 2006 Posts: 1279 Location: Portland, Oregon
|
Posted: Sat Mar 22, 2008 6:15 am |
Well I think I got it. Subbing works, I don't know why I was not seeing that earlier.
|
|
|
|
|
|