Register to post in forums, or Log in to your existing account
 

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD Beta Forum
Anaristos
Sorcerer


Joined: 17 Jul 2007
Posts: 821
Location: California

PostPosted: 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}*(Spouse): THIS IS A TEST*

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}*[*HELPER*]: XXXXXXXX **(Helper*[1;37m)* has entered Aardwolf.*[0m

Finally a string where the sequence does not start with bright white:
Quote:

{chan ch=newbie}*[*[1;35mNewbie*] *(*72*) *XXXXXXXXX: finally got in ty*

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.
Reply with quote
Zugg
MASTER


Joined: 25 Sep 2000
Posts: 23379
Location: Colorado, USA

PostPosted: 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.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD Beta Forum All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum

© 2009 Zugg Software. Hosted by Wolfpaw.net