|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Feb 17, 2009 6:34 am
MXP: locked locked mode irregularities. |
My MUD doesn't support MXP. Because of this, my MUD doesn't strip out MXP tags from anything users can write and it also doesn't preface lines with locked mode to force the tags to be displayed. I can't just disable MXP because I like to use it myself to make things prettier on the client side. So, to stop other players on the MUD from ever being able to send me tags - even open ones - I decided to set locked mode as the new default, like so:
#say <b>lol!</b>
#say %e[7z
#say <b>lol!</b>
Seems to be working fine, and all subsequent #says will display their tags. But when I do something that'll cause a line to be sent back from the MUD containing MXP - say <b>lol</b> was my test case - then the tag is rendered on the line and the new default seems to become open mode. Am I using locked locked mode improperly here, or is there a bug here? If the former, how would I go about doing this? If there really is no way to do this, might I suggest a "Client-side only" option for MXP, which will turn off parsing for server-side lines somehow?
You can demonstrate more of this weirdness offline:
#say <b>lol</b>
#say %e[7z
#say <b>lol</b>
#show <b>lol</b>
#say <b>lol</b>
generates output:
lol
<b>lol</b>
<b>lol</b>
lol
Even though there's no mode change anywhere. It's very weird. |
|
|
|
Vijilante SubAdmin
Joined: 18 Nov 2001 Posts: 5182
|
Posted: Tue Feb 17, 2009 12:17 pm |
You might try doing "#MXP 7 {}" to set the locked mode instead of #SAY.
|
|
_________________ The only good questions are the ones we have never answered before.
Search the Forums |
|
|
|
Fang Xianfu GURU
Joined: 26 Jan 2004 Posts: 5155 Location: United Kingdom
|
Posted: Tue Feb 17, 2009 5:00 pm |
...I can't believe I didn't think of that. Works like a charm, thanks :)
If you want to send a message on the #mxp 7 line to avoid a random blank line, you can do:
#mxp 7 {%e[0zMXP default mode is now <b>locked</b>.} |
|
|
|
Zugg MASTER
Joined: 25 Sep 2000 Posts: 23379 Location: Colorado, USA
|
Posted: Tue Feb 17, 2009 6:21 pm |
Actually, this raises a good point and it's something I'm dealing with in the next beta. What CMUD needs is really *two* different MXP switches. The first option would determine how CMUD responds to the MXP query from the server. Turning this off would prevent the server from detecting the MXP emulation in the client.
The second MXP option would be to enable/disable the *local* MXP emulation.
In other words, if you wanted to prevent MXP parsing of any incoming text from the *server*, you would turn off the first option. That would stop tags from the server from being parsed, but would still allow local MXP usage via the #MXP or #SHOW commands. Turning off the second "local" setting would turn off MXP entirely.
Obviously Fang is just reading my mind again because I was thinking about this option just two days ago myself! Mainly because I was working on TeSSH and in TeSSH you don't want it to ever parse the text from the MUD as MXP. For example, I was in the "vim" editor on my server, and TeSSH was treating some HTML files as MXP commands and screwing up the display. So TeSSH needs to have MXP disabled by default, but I didn't want this to prevent you from using MXP in various triggers for coloring the output. |
|
|
|
|
|