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

Play RetroMUD
Post new topic  Reply to topic     Home » Forums » zMUD General Discussion
Death
Apprentice


Joined: 25 Jun 2002
Posts: 109
Location: USA

PostPosted: Thu Mar 06, 2003 8:09 am   

catching special characters
 
#trigger {^--> (%w) forgets the real world and steps into the myth!} {#win {Global News} %ansi( red, bright)--> %1 %ansi( black, bright)has logged %ansi( green, bright)on%ansi( black, bright) at %ansi( green, bright)%time( tt)%ansi( gray).}

#trigger {^(*) -Gossips- '(*)'} {#win {Global News} %ansi( black, bright)~[%ansi( white, bright)G%ansi( black, bright)o%ansi( white, bright)ss%ansi( black, bright)i%ansi( white, bright)p%ansi( black, bright)~] %ansi( red, bright)%1 %ansi( black, bright)says '%ansi( gray)%2%ansi( black, bright)'}

there's two of my triggers of many in my global catching set

but i've noticed in all the channels, it won't catch special characters, like ; or % or @. is there anything i can add to these triggers to catch these? thanks for any help.

-Death
Reply with quote
megamog75
Enchanter


Joined: 20 Nov 2002
Posts: 627
Location: USA

PostPosted: Thu Mar 06, 2003 12:55 pm   
 
The problem is that Zmud IS catching them but when it try's to put them in the new window it can not because Zmud reconises them asSpecial characters and Throws them out.
There is probably a number of ways to fix this and I am not ofering you a fix just Ideas:
1) instaed of sending it directly to a new window, send it to a @var and then #var2 %replace(@var,"@","~@") However you would need more than one to replace all the stuff.

2)same as above except that you use one big %replace
example:
#win {Global news} #echo %replace(%replace(%replace(@var,"@","~@"),",","~,"),"%",~%")

I noticed that you are using a color pattern and you would have to tweek the above examples to what ever you colors you wanted.

Well goodluck :)

megamog75
Reply with quote
Emit
Magician


Joined: 24 Feb 2001
Posts: 342
Location: USA

PostPosted: Thu Mar 06, 2003 4:20 pm   
 
the * wildcard doesn't match zmud system characters, and for a very good reason. If someone were to gossip something like this:

Jerk -Gossips- 'msg;#killall;'

then when your %1 expands in your trigger, it expands into that. I hope you can see the danger!

--------

moon.icebound.net:9000
Reply with quote
Display posts from previous:   
Post new topic   Reply to topic     Home » Forums » zMUD 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