|
Anaristos Sorcerer
Joined: 17 Jul 2007 Posts: 821 Location: California
|
Posted: Sun Aug 29, 2010 2:16 am
[323B]Ansi triggers not firing |
The following trigger (which works in 322aB and previous) does not fire in 323B if the ANSI Trigger option is checked:
Code: |
<trigger name="chancap" priority="15310" ansi="true" regex="true" id="1531">
<pattern>^\{chan ch=([^}]+)\}([^$]+)$</pattern>
<value>#WINDOW @chandb.%1 %2
;;
#GAG</value>
</trigger>
|
There is also another problem with ansi triggers which I can't demonstrate in 323B since the trigger is not working. The problem is as follows, if the data after {chan ch=xxxxx} begins with the high white color (bwhite in the Aardwolf colorset), CMUD will ignore the color setting for the string and display it in the default color until it finds another color code. This can be confirmed by anyone in Aardwolf who has similar capture triggers using the channel tags. If the string begins with any other color code, the capture works fine. The problem is related to the Ansi trigger because if I use a traditional capture such as:
Code: |
<trigger name="spotrig" priority="9060" regex="true" id="1533">
<pattern>^(?:\(Spouse\): [^$]+)$</pattern>
<value>#CAP Spouse
;;
#GAG</value>
</trigger>
|
The capture recovers the colors.
EDIT:
This is what the trigger captures in the situation described above (the * represents the ESC character):
Quote: |
{chan ch=spouse}*[1m(Spouse): THIS IS A TEST*[0m
|
That's for a channel where the string is all in bright white.
In the following instance the string starts with bright white then switches to bright green:
Quote: |
{chan ch=helper}*[1m[*[1;32mHELPER*[1;37m]: XXXXXXXX *[1;37m*([1;32mHelper*[1;37m)*[1;37m has entered Aardwolf.*[0m
|
Finally a string where the sequence does not start with bright white:
Quote: |
{chan ch=newbie}*[1;33m[*[1;35mNewbie*[1;33m] *[0m(*[1;31m72*[0m) *[1;33mXXXXXXXXX: finally got in ty*[0m
|
As you can see the final example shows that all the colors are captured properly. Only in the case of an initial bright white character the problem arises. |
|
_________________ Sic itur ad astra. |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Mon Aug 30, 2010 4:01 pm |
I posted this in another thread, but I believe the issue here is that previous versions of CMUD were stripping the ANSI color at the beginning of the line. The MUD is actually sending ESC[37m at the beginning of the line, so you need to add that to your trigger pattern now instead of just starting with ^{chan}
If Aardwolf sent the ANSI "reset" command ESC[0m at the beginning of the line instead of forcing the starting color of the line with ESC[37m, then you wouldn't have this problem. |
|
|
|
|
|