MXP SEND Tag multiple commands

Posted by Cage_fire_2000 on Tue 29 Jul 2008 08:13 PM — 7 posts, 30,648 views.

USA #0
I've been trying to add partial MXP support to a game, and trying turning it on and off on the fly, it seems to work so far, but multiple command send tags seem to stop working when the MXP OFF tag is sent, the basic hyperlinks work, but not the drop-down menu. I'm using 4.18, is this a bug?
Australia Forum Administrator #1
What do you mean, "multiple command send tags" - can you give an example?
USA #2
<SEND "help|look">test</SEND>

The 'help' command when you left-click works even after MXP is turned off, but the right-click menu showing 'help' and 'look' stops working.
Australia Forum Administrator #3
Is which part a bug? That some of it works after turning off MXP, or that some doesn't work?

Originally turning off MXP disabled all that stuff, then I added the Hyperlink script command, and then re-enabled hyperlinks so scripted hyperlinks would still work, whether or not MXP is on.
USA #4
I just think it would be nice if the drop down menu would still work, I suppose it's not essential, but it seems silly that single actions work, but the drop-down stops working, I mean how much extra processing does that take that it needs to be disabled?, although if there was a way to add scripted hyperlinks with multiple actions, I suppose that'd be pretty cool to. The only reason I'm turning MXP off is so I don't have to escape every < and > that comes up. I don't want to implement full MXP support because it has a lot of stuff that I don't need and would need extra code to get around. The only things I need are MXP color tags for some people, and MXP hyperlinks.
Australia Forum Administrator #5
Quote:

I've been trying to add partial MXP support to a game, and trying turning it on and off on the fly ...


Don't do that, it is like trying to get partially pregnant. Add the support or don't add it. It is like Yoda said to Luke "do, or not do - there is no try".

See this link:

http://www.gammon.com.au/mushclient/addingservermxp.htm

Quote:

The only reason I'm turning MXP off is so I don't have to escape every < and > that comes up.


Bite the bullet and just fix the code to automatically do it. In the link above you don't have to escape every < and>, it automates it, and allows for whether the user is using MXP or not.

The code fragments show how to do it, it isn't much and isn't hard.
USA #6
I agree with Nick. It's easy to do things properly, and in any case you will pay later (one way or the other) if you take shortcuts now.