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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » CMUD General Discussion
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Mon Feb 22, 2010 12:36 am   

coloring issue
 
i have a script to sub then to #cap to a channel and it just happens to be removing the color of ( or [ and changing them to white, below is the debugger

Code:
0.0020 | c  Aardwolf |  [1] Aardwolf Comline : start :
0.0037 | a  Aardwolf |gt test
0.0029 | h  Aardwolf |<ESC>[2Sgt test<ESC>[0m
0.0058 | i  Aardwolf >gt test<CR><LF>
0.0014 | d  Aardwolf |  [1] Aardwolf Comline : stopped
0.1375 | i  Aardwolf *{chan ch=gtell}<ESC>[1;33m(<ESC>[1;37mGroup<ESC>[1;33m) <ESC>[1;33mHelperMan Hadar: 'test'<ESC>[0;37m<LF><CR><LF><CR>
0.0001 | <ESC>[1;31m1990<ESC>[0;37m/<ESC>[1;34m1990<ESC>[0;37m/100% <ESC>[1;31m1384<ESC>[0;37m/<ESC>[1;34m1583<ESC>[0;37m/87% <ESC>[1;31m1818<ESC>[0;37m/<ESC>[1;34m1818 <ESC>[1;33m170803 <ESC>[1;32m2147<ESC>[0;37mxp 0tell <ESC>[1;31m2491<ESC>[0;37m | 0tc |DX<ESC>[0;37m <ESC>[0;37m<LF><CR>
0.0001 | {stats}95/41,96/58,98/40,90/37,86/39,98/40,100,87,100,248,251,You are Standing.,9999,1990/1990,1384/1583,1818/1818,170803,3224,1,2491,2147,53,5<LF><CR>
0.0089 | a  Aardwolf |{chan ch=gtell}(Group) HelperMan Hadar: 'test'
0.0015 | f  Aardwolf |  Pattern: ^\{chan ch=([^}]+)\} : (%1="gtell")
0.0022 | c  Aardwolf |  exec : Pattern "^\{chan ch=([^}]+)\}" : #sub {} #if (%1!="auctio...
0.0026 | n  Aardwolf |  Exec Trigger "^\{chan ch=([^}]+)\}"
0.0015 | a  channels |(Group) HelperMan Hadar: 'test'
0.0187 | g  Aardwolf =(Group) HelperMan Hadar: 'test'
0.0146 | a  Aardwolf


sorry i left all the spam in there ... im on 3.14a and its been doing it sense i added this trigger just thought i would now ask for help[/code]
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Feb 22, 2010 6:05 pm   
 
Hadar, I'm sorry to be picking on you, but this is an example of a growing problem. If you have a problem with the Beta version of Cmud (such as v.3.14), you should be posting in the Beta forum, not the General Discussion forum. We have had way too many people posting problems with the Beta version here in General Discussion lately.

That said, can you post the code for your trigger? It sort of looks like your code is substituting the entire line with a blank line, but it's hard to tell without the entire trigger.
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Mon Feb 22, 2010 7:16 pm   
 
forgot to post on here, its been happening sense before the beta, for like 3-4 releases already so no its not a beta problem, its a problem with my trigger ... THAT being said
Code:
<trigger priority="10" regex="true" id="1">
  <pattern>^\{chan ch=([^}]+)\}</pattern>
  <value>#sub {}
#if (%1!="auction") {#cap channels}
</value>
</trigger>
_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Rahab
Wizard


Joined: 22 Mar 2007
Posts: 2320

PostPosted: Mon Feb 22, 2010 7:55 pm   
 
3-4 releases? Do you mean 3-4 releases of 3.xx or was this also happening on 2.xx? There has been no public release of 3.xx, they're all beta versions.

Hm. I'm not sure what the problem is offhand, but a better way to do it would be to use #GAG instead of #SUB {}. See if that works better for you.
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Feb 23, 2010 12:21 am   
 
Also, click on your Capture window, then go into your MXP Preferences screen and make sure the "Capture MXP" option is on. This ensures that color is captured properly to windows. It is enabled by default for new windows, but if you have an old session package, it might not be enabled.
Reply with quote
hadar
Apprentice


Joined: 30 Aug 2009
Posts: 198
Location: my apt, in california

PostPosted: Tue Feb 23, 2010 3:14 am   
 
settings are the same in both windows

and rehab this has been happining in 2.xx also

edit** it seems like the green ones(ft) are fine gt,newbie, and a couple other channels i can not recall which have yellow or some other color is fine



edit for the image showing what i mean

_________________
if you build it they will come, assuming that they have not already come to build it
Aardwolf Bootcamp
My youtube channel
Reply with quote
Zugg
MASTER


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

PostPosted: Tue Feb 23, 2010 5:37 pm   
 
I reproduced the problem. Using the Trigger snippet show above, and the following #SHOW command will cause the problem:
Code:

#show {~{chan ch=gtell~}%e[1;33m(%e[1;37mGroup%e[1;33m) %e[1;33mHelperMan Hadar: 'test'%e[0;37m}


The bug is with the #SUB command. The #SUB command is working on the plain ASCII text and not the raw data stream. So the #SUB command doesn't have any of the ANSI color control codes in it. This causes the #SUB {} command to "eat" the ANSI color codes immediately following the matching pattern.

I've added it to the bug list.
Reply with quote
MattLofton
GURU


Joined: 23 Dec 2000
Posts: 4834
Location: USA

PostPosted: Tue Feb 23, 2010 6:40 pm   
 
Is the code for #SUB and #PSUB shared? #PSUB does this as well.
_________________
EDIT: I didn't like my old signature
Reply with quote
Zugg
MASTER


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

PostPosted: Wed Feb 24, 2010 5:19 pm   
 
Yes, it's the same issue. The issue is that both #SUB and #PSUB are only working on the stripped ASCII text without the ANSI color control codes.
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » CMUD General Discussion 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