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
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Sun May 11, 2003 9:18 am   

MXP
 
I'm kind of pushing MXP into my muds output. Using the muds ansi controls, I can put MXP tags before, and after anything that has a defined variable (which is just about everything.)

This works fine, except when things are longer than one line. Apparently, if zmud doesn't see the </color> tag at the end of the line, it does not process the <color> tag at the begining of the line.

Is there an option or something I can turn on to allow a closing MXP tag to end on another line, and process all lines inbetween the two tags? (much like HTML?)

Father Horks
The only problem with computer security, is when you think it exists.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Sun May 11, 2003 1:40 pm   
 
The only way would be to put your zMUD in locked secure mode. However, this is dangerous since it will also process any secure tags sent by other people in your MUD to you.

Kjata
Reply with quote
Zugg
MASTER


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

PostPosted: Sun May 11, 2003 6:38 pm   
 
Actually, that isn't quite true. As long as the initial <COLOR> is done in secure mode, zMUD will keep the coloring until the next secure </COLOR> even if it's on a different line. So, you don't need to lock the MUD into secure mode, but you need to put the secure mode on lines that contain secure tags. Any tag that you want to span more than one line is considered a secure tag.

Reply with quote
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Sun May 11, 2003 9:54 pm   
 
WOO! I'm just glad to hear it can be done! :)

So can you tell me how I can make my <color> tag a secure tag? I thought secure tags had to come from the mud itself :/

Father Horks
The only problem with computer security, is when you think it exists.
Reply with quote
Zugg
MASTER


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

PostPosted: Sun May 11, 2003 10:56 pm   
 
You can only put your own local zMUD into secure mode using either the #MXP command or by putting %e[1z in front of your tag. However, the MUD will strip this and anyone else that sees your text will not see the color. It is not possible to send multiline MXP commands to other users. Only the MUD itself can do that (using secure mode).

You can obviously see why this is done. If there was a way for you to color more than one line of another user's session using a chat command on the MUD, then people could abuse MXP and cause all sorts of havoc. That is why MXP is *NOT* the same as HTML. HTML doesn't have the security built in to prevent abuse of rich text like MXP does.

Reply with quote
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Mon May 12, 2003 12:22 am   
 
Thanks for the personal help Zugg. I appreciate it, and I feel bad for taking up your time. But I'm still confused as to how I can accomplish what I want to do. Maybe I can't? Maybe I need to repharse my question into something that makes better sense about specifics? Here is as specific as I can get:

the mud uses a command 'aset' to set ansi codes for system-side vars. For this example, i'll use room_long (the var for long room descriptions). If i wanted to use the command as it was meant, I would enter:

aset room_long magenta (or some other macro name that would enter the proper esc char for that color)

this would set two vars. it would set room_long_pref with the colored esc char, and set room_long_suff with a reset color char.


Using the 'aset' I can specify room_long_pref with <color magenta> and room_long_suff with </color>


This works, cept when multi-lined, which I think you understand that part. How, using my example, can I set a secure tag in the value?

I tried what I thought you were telling me, but it didn't work. I tried:

aset room_long_pref %e[1z<color orange>

zmud still didn't see this as anything more than standard charaters, and displayed them on the screen, with no color.

Father Horks
The only problem with computer security, is when you think it exists.
Reply with quote
Kjata
GURU


Joined: 10 Oct 2000
Posts: 4379
Location: USA

PostPosted: Mon May 12, 2003 12:58 pm   
 
That's what I thought was happening and why I suggested the perm-locked mode.

You can still do it by locking the line individually, but that has to come from you. You would need to create some triggers to fire on these lines that will contain COLOR tags. The trigger will then have to use #SUB to put the escape sequence at the beginning of the line, followed by whatever else the line contained. Example:
#TRIGGER {* testing *} {#SUB {%concat(%char(27), "[1z", %line)}}

If the line that fired that trigger had any tags, they would have been processed in secure mode.

Kjata
Reply with quote
horks
Apprentice


Joined: 20 Jul 2001
Posts: 127
Location: USA

PostPosted: Wed May 14, 2003 12:02 am   
 
ok ok. Thanks Kjata. After reading the support library about MXP again, I think I have a good understanding of how the security works.

I can't use the MXP tag from the mud side and secure it, so I need to sub out the lines, and do the MXP on my side (because all mxp tags in a #ECHO, #SHOW, or #SUB command are always considered secure, right?)

This could still cause some problems, as There is no way to identify a room_desc (no specific format). So using the 'aset' command, I could maybe put a set of trigger charaters (like room_descO for open and room_descC for close), then set a trigger off those specific charaters and replace them with MXP tag when I use #SUB to replace the entire room_desc? (my goodness that's a long sentance)

A room_desc could be 1 line, it could be 15 lines, I don't have anyway to know ahead of time (cept for maybe the trigger charaters I put at the begining and the end.) Can you help me come up with how the script might look like?

Boy, this could fix MANY of the annoying problems I've had getting zMud features to work with the mud I'm on. I could actually capture ALL of the room data in the mapper! :)

Father Horks
The only problem with computer security, is when you think it exists.
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