Register forum user name Search FAQ

Gammon Forum

Notice: Any messages purporting to come from this site telling you that your password has expired, or that you need to verify your details, confirm your email, resolve issues, making threats, or asking for money, are spam. We do not email users with any such messages. If you have lost your password you can obtain a new one by using the password reset link.

Due to spam on this forum, all posts now need moderator approval.

 Entire forum ➜ MUSHclient ➜ MXP and Pueblo ➜ Ending MXP tag support.

Ending MXP tag support.

It is now over 60 days since the last post. This thread is closed.     Refresh page


Pages: 1 2  

Posted by halkeye   Canada  (28 posts)  Bio
Date Sun 21 Dec 2003 09:51 AM (UTC)
Message
Using the MXP snippet on this site..
I belive this problem has todo with the secure mode sent at the beggining..


(MXP starts off as off)

[prompt] eq
You are using:
<held>              a comlink

[prompt] config +mxp
Ok.

[prompt] eq
You are using:
<held>              a comlink

[prompt] config -mxp
Ok.

[prompt] eq
You are using:
              a comlink

[prompt]


I turn off mxp support, but it doesn't actually let mushclient know that we are no longer actually not doing MXP stuff.

If you turn on mushclient's debugging of MXP tags, it will do something like:
unknown element <held>

How do i do this? Turn it off i mean.

IAC DONT MXP \0

?

(forgive any information i've miseed, i'm on the tired side)

Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #1 on Sun 21 Dec 2003 11:26 AM (UTC)
Message
Your config -mxp thing may not be working correctly. If you're using Nick's very fine MXP code, it automatically takes care of changing < and > into non-MXP codes for you in case you're not running in MXP. I know, because I implemented it and it works perfectly for me. :)

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by halkeye   Canada  (28 posts)  Bio
Date Reply #2 on Sun 21 Dec 2003 05:35 PM (UTC)
Message
I quickly started to realize how good that snippet of code really was. Thats why i've been reluctant to mess with it.

And yes, its working awsomly for hiding mxp tags when mxp is turned off.

else if (!str_cmp(argument, "on"))
        {
                send_to_char("Initalizing MXP.\n\r", ch);
                SET_BIT(ch->act,PLR_MXP);
                send_mxp_stylesheet( ch->desc);
        }
        else if (!str_cmp(argument, "off"))
        {
                send_to_char("Terminating MXP.\n\r", ch);
                REMOVE_BIT(ch->act,PLR_MXP);
                ch->desc->mxp = FALSE;
         }


ps, send_mxp_stylesheet is EXACTLY the same as the example's void turn_on_mxp (DESCRIPTOR_DATA *d), except i liked this function name better.

As I said, It works perfectly for when MXP is turned on. But in mushclient, when MXP is turned off, normal text like <held> does not get displayed, as mushCLIENT things its actually an MXP tag.

Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848
Top

Posted by Meerclar   USA  (733 posts)  Bio
Date Reply #3 on Sun 21 Dec 2003 07:08 PM (UTC)
Message
Unless this is something very specific to how you configured your mud, the problem with the "invisible" tags is server side, not MC. Considering I code, build and play a Dawn of Time mud, I can say for fact that if the server side info is properly configured, the inventory fields will indeed show up with mxp disabled. Everything else thats riddled with mxp in DoT shows up just fine too but some of the functionality is lost without mxp. I'm fairly certain Khalin wouldn't mind if you looked at the mxp implementation in DoT for comparison (and possibly inspiration with some credit mentions perhaps) to see where you might have something misflagged for nonmxp users.

Hell, you may even decide you like DoT enough to just use it instead of trying to patch mxp into another codebase.

Meerclar - Lord of Cats
Coder, Builder, and Tormenter of Mortals
Stormbringer: Rebirth
storm-bringer.org:4500
www.storm-bringer.org
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #4 on Sun 21 Dec 2003 07:11 PM (UTC)
Message
Actually, it's a little odd, because I use Nick's MXP code basically straight out of the box, and I have no trouble at all with MXP disabled. All the "tags-which-aren't-tags" (such as <held>) properly come out as "<held>" and aren't eaten up. So I'd say that this is server-side as well, and doesn't have to do with MUSHclient.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by halkeye   Canada  (28 posts)  Bio
Date Reply #5 on Sun 21 Dec 2003 07:22 PM (UTC)
Message
I didn't realize i implied it was a mushClient bug
but it was a mushclient Problem.

zMUD (wrongly?) outputs the tag anyways when unreconized. I think. Either way, it works fine in zmud not in mushclient.

So i was trying to figure out how to let mushClient know that we are no longer sending MXP data.

Since this will also let any other clients know properly too.

Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848
Top

Posted by David Haley   USA  (3,881 posts)  Bio
Date Reply #6 on Sun 21 Dec 2003 07:38 PM (UTC)
Message
What we're trying to say is that our implementations work just fine; I for one do use MUSHclient and when I turn off MXP it all works perfectly.

So if it's not an issue with MUSHclient - which it probably is not, given that it works for other people - it is most likely an issue with something on your server. Perhaps MXP isn't actually being fully turned off or something.

Perhaps, what you can try doing is making sure MXP is off client-side as well. It would surprise me if that were the issue, but, well, you never know. When you turn MXP off, you might not actually be sending the "switch off" commands (if those exist?) I believe Nick's code is meant to handle auto-detection, not on-the-fly switching between MXP-on and MXP-off.

David Haley aka Ksilyan
Head Programmer,
Legends of the Darkstone

http://david.the-haleys.org
Top

Posted by halkeye   Canada  (28 posts)  Bio
Date Reply #7 on Sun 21 Dec 2003 07:44 PM (UTC)
Message
That was my original question.
How do you turn it off?

Quote:

How do i do this? Turn it off i mean.

IAC DONT MXP \0

?


IAC WONT MXP \0

some sub negotation thing?

I guess my fault for posting to the wrong forum.
But i was having the problem in mushclient, so i figured i'd get the best response here.

Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848
Top

Posted by Eos   USA  (52 posts)  Bio
Date Reply #8 on Sun 21 Dec 2003 08:00 PM (UTC)
Message
There is no sub negotiation to turn it off once you've turned it on.

You can turn it off server side, like you've been doing, but that causes your server to stop sending the HTML equivalents of symbols, while the client itself is still parsing HTML.

This is why your text vanishes when enclosed in anchors.

You may have to add to your MUD a means of identifying players who were using MXP, but no longer are, so the MUD knows not to continuing converting characters, but cease sending actual MXP.

Top

Posted by halkeye   Canada  (28 posts)  Bio
Date Reply #9 on Sun 21 Dec 2003 08:11 PM (UTC)
Message
Yea, i realized thats what the problem was.

Thanks for giving me a concreate answer.

And adding support for that shouldn't be hard.

Thanks again

Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848
Top

Posted by Eos   USA  (52 posts)  Bio
Date Reply #10 on Sun 21 Dec 2003 08:16 PM (UTC)
Message
Indeed. After dissecting DoT it appears that's what they've done. It looks like they detect whether or not MXP is in use by the client, then use the players settings to determine whether or not they actually make use of the MXP or not.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #11 on Sun 21 Dec 2003 09:28 PM (UTC)
Message
You appear to be correct that there is no subnegotiation for turning MXP off. I thought there was, but after browsing the code it appears not.

This is consistent with zMUD, I think which is basically in MXP mode all the time, so it can't be turned off there either.

However MUSHclient does stay out of MXP mode unless it is specifically turned on (thus things like <held> wil work if not in MXP mode).

You could probably make a case for having MUSHclient support the subnegotiation, but is it worth it if zMUD doesn't?

Having said that, I am prepared to add that to the next version if you think it is a good idea. :)

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

Posted by halkeye   Canada  (28 posts)  Bio
Date Reply #12 on Sun 21 Dec 2003 11:02 PM (UTC)
Message
Well, the only problem would be that its not exactly spec. and if i send it out to other clients, who knows what might happen.

I do like the idea of telling the client exactly what is happening.

But wouldn't it be just some trivial lines in convert_mxp_tags and count_mxp_tags?

my guess would be here abouts:
                        default:
                                if (bMXP)
                                {
                                        switch (c)
                                        {
                                                case '<':       /* < becomes &lt; */
                                                case '>':       /* > becomes &gt; */
                                                        count += 3;
                                                        break;

                                                case '&':
                                                        count += 4;    /* & becomes &amp; *
                                                        break;

                                                case '"':        /* " becomes &quot; */
                                                        count += 5;
                                                        break;

                                        } /* end of inner switch */
                                }   /* end of MXP enabled */


If MXP is detected escape.
For the rest, its if its detected and the player flag is turned on?

I must be missing something about this code though, because when i tried to simply do that, i had my output buffer corrupted (probably due to count being off, or the memcpy not being done in the right position, or something.

Any hints as to what todo to deal with this in the mean time?

Gavin
Dark Warriors - Coder
http://darkwars.wolfpaw.net
telnet://darkwars.wolfpaw.net:4848
Top

Posted by Eos   USA  (52 posts)  Bio
Date Reply #13 on Sun 21 Dec 2003 11:11 PM (UTC)

Amended on Mon 22 Dec 2003 12:25 AM (UTC) by Eos

Message
I believe its a good idea to add it.
Though not specifically included in the spec, there is precedent for it.

Sub-negotiation is not a detail handled by the specification anyhow, it merely suggests using the guidelines for MCP, and MCP *can* be turned off after being activated, if the client is written to support it.

http://www.zuggsoft.com/zmud/mxp.htm
Bottom portion under "Implementation Details"
"If you want to get more sophisticated, you can use the Telnet Option negotiation to determine if the client supports MXP"

http://www.zuggsoft.com/zmud/mcp.htm

"Compression can only be terminated by the server - a normal end to the compression stream is assumed to mean "revert to uncompressed mode". It may be desirable for the server to automatically terminate compression when an IAC DONT COMPRESS sequence is received from the client."

So again, based on precedent, and apparent interest, I would encourage it to be added. Those who use Zuggs stuff can deal with him on the subject of him supporting it, right now people are trying this anyway with neither client supporting it fully. One might as well.
Top

Posted by Nick Gammon   Australia  (23,165 posts)  Bio   Forum Administrator
Date Reply #14 on Mon 22 Dec 2003 12:36 AM (UTC)
Message
I have added the telnet negotiation thing as suggestion #503.

I'm not sure about the idea of doing it at the server end. Either they can turn off MXP or they can't. If they can then the server should stop sending it and the client should stop expecting it. As no known client supports turning it off at the client end, it seems a bit problematic to implement it at the server end.

In the case of MUSHclient, disconnecting should do it, so you could accompany the "mxp -off" command with a suggestion to the player that they immediately disconnect and reconnect.

Or, say that will take effect next time they connect, and keep sending MXP for now.

- Nick Gammon

www.gammon.com.au, www.mushclient.com
Top

The dates and times for posts above are shown in Universal Co-ordinated Time (UTC).

To show them in your local time you can join the forum, and then set the 'time correction' field in your profile to the number of hours difference between your location and UTC time.


65,190 views.

This is page 1, subject is 2 pages long: 1 2  [Next page]

It is now over 60 days since the last post. This thread is closed.     Refresh page

Go to topic:           Search the forum


[Go to top] top

Information and images on this site are licensed under the Creative Commons Attribution 3.0 Australia License unless stated otherwise.