|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Aug 22, 2007 7:00 pm
"variables" sent from mud being expanded? |
I recently tried to share some code with another player and noticed an odd thing. When text from the mud contained strings that look like variables, like '%char' and '@myvar', cmud parsed and replaced them before displaying them on my window. Especially interesting, the happened even when #VERBATIM was on. This does not seem like correct behavior. The person I was talking with was using zmud, and was not seeing the same behavior. Is this a bug? Or some setting that can be changed?
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Aug 22, 2007 7:20 pm |
You mean that when the MUD sent any text that looked like a variable reference, CMUD expanded the variable? Does it only work with valid variables, or with all var-like text? I'm not seeing this - I'd suspect a trigger of yours is using the #sub command somehow, which is causing CMUD to parse the text. This also wouldn't be affected by the verbatim setting (and, indeed, any other triggers running in the background will be immune to verbatim as well). Try turning off trigger parsing and see if it still does it.
|
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Aug 22, 2007 7:26 pm |
Hm. I have some #SUB statements in triggers to #TAG room description elements, but those shouldn't be triggering on this text. I'll look through my other triggers for #SUB.
|
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Wed Aug 22, 2007 7:33 pm |
Well, try just turning off all triggers first - if it stops doing it, you know the trouble is in one of your triggers and not in CMUD itself. I suggest #sub because it's the most obvious way that text on the screen is altered.
If it still happens with triggers off, then it sounds like a bug. |
|
|
|
Rahab Wizard
Joined: 22 Mar 2007 Posts: 2320
|
Posted: Wed Aug 22, 2007 7:34 pm |
Found it. Just as you suggested, it was a #SUB problem. It triggers on all communications (say, shout, ooc, etc.) which is why it was happening every time I tried to test it. Thanks! I'll figure out a better way of writing that trigger without #SUB. I'd already noticed it causing some other problems.
|
|
|
|
gamma_ray Magician
Joined: 17 Apr 2005 Posts: 496
|
Posted: Wed Aug 22, 2007 8:30 pm |
Why don't you just use %expand to (unintuitively) keep it from expanding?
|
|
|
|
|
|