|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sat Aug 28, 2010 3:42 pm
Problems with trigger pattern matching |
The following pattern works correctly in 322aB:
Code: |
^\{chan ch=([^}]+)\}([^$]+)$
|
It captures nothing in 323B. What's more when the Editor tests the pattern if find that it doesn't match. However, external REGEX tools have no problem matching with this pattern.
Here is the complete trigger:
Code: |
<trigger name="chancap" priority="15310" regex="true" ansi="true" prompt="true" id="1531">
<pattern>^\{chan ch=([^\}]+)\}([^$]+)$</pattern>
<value>#WINDOW @chandb.%1 %2
;;
#GAG</value>
</trigger>
|
After I pasted the xml I saw the problem: prompt=yes. The question why does it say that? It's a pattern trigger and it is so specified. Moreover, it's the same trigger in the same paackage that 322aB was using. So the reason must be that something in the settings interpretation has changed. Also, I had to turn ANSI trigger off, with this setting on, the trigger fails. |
|
_________________ Sic itur ad astra. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Sat Aug 28, 2010 4:44 pm |
There must have been something wrong with your trigger. I just looked at the XML of my triggers and none of them have ANSI or Prompt turned on (unless I turn them on). Or maybe you turned on these options and forgot?
But I can't reproduce any problem with this here. |
|
|
|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sun Aug 29, 2010 1:44 am |
This is the same package I was using in 322aB. When I install a new version I simply copy the data folder from the last version and rename it. I un-installed 323B and went back to that version and every thing works (with an exception which I plan to post). When I started 323B, the triggers didn't work. I verified that the REGEX was correct, and it was. I didn't even notice the extra setting until I posted the XML to this forum. It is exactly the same package. Also, and I think this is significant, the trigger won't fire if I have the ANSI option checked. So there are two problems here, the extra setting, and the color trigger not firing.
I am back running 322aB temporarily. Here is what the setting for the version looks like:
Code: |
<trigger name="chancap" priority="15310" ansi="true" regex="true" id="1531">
<pattern>^\{chan ch=([^}]+)\}([^$]+)$</pattern>
<value>#WINDOW @chandb.%1 %2
;;
#GAG</value>
</trigger
|
Here is a sample input without the color settings:
Code: |
{chan ch=newbie}[Newbie] (1) Dorthead: guess who am i?
|
EDIT: This is also important, I think. When I looked at the trigger setting in 323B, the Trigger on Prompt was not checked. I had to remove the setting from the XML to update it. |
|
_________________ Sic itur ad astra. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Aug 30, 2010 3:59 pm |
The reason the trigger no longer worked in v3.23 is because older versions were stripping the ANSI color at the beginning of the line. Since your trigger pattern started with ^, the pattern wasn't matching. You probably needed a %e[37m at the beginning.
I just loaded some older sessions that had triggers with ANSI, Trigger on Prompt and other various options and I did not find any changes to the trigger options when loaded into v3.23. If you still have your package from 3.22 that shows the options changing when loaded into 3.23, then please email it to me at sales@zuggsoft.com.
Otherwise I can only assume that you were playing with various trigger options trying to get your trigger to work. |
|
|
|
|
|