Zmud, MXP, and Smaug

Posted by Eos on Thu 09 Aug 2001 04:10 AM — 7 posts, 30,455 views.

USA #0
Unlike Mushclient, Zmud at the moment has a problem understanding MXP. It is currently misinterpreting user defined elements, which is something only Zuggsoft can fix, but it is also not accepting any MXP flags not sent to it in secure mode.
Australia Forum Administrator #1
For my SMAUG port with MXP I have a small patch that will fix the problem with the current version of zMUD (6.16).

The patch is only a few lines, and basically sends "turn into secure mode" before every MXP command.

Save the patch below to disk in the "src" directory, then type:


patch -p5 < zmudfix.patch


This will patch the file comm.c.

Then do a "make".

After applying this zMUD users will see hyperlinks, however the only ones that work properly are the exits, because zMUD 6.16 has a bug in processing attributes for MXP tags (these are discussed at some length on the zMUD developers pages).

Patch appears below - copy it and paste into Notepad, then save as zmudfix.patch.





*** ../../../smaugmxp/dist/src/comm.c	Wed Jul 18 16:48:38 2001
--- comm.c	Wed Jul 18 16:53:58 2001
***************
*** 1466,1471 ****
--- 1466,1473 ----
          bInTag = TRUE;
          if (!bMXP)
            count--;     /* not output if not MXP */   
+         else
+           count += 4;  /* allow for ESC [1z */
          break;
  
        case MXP_ENDc:   /* shouldn't get this case */
***************
*** 1542,1548 ****
--- 1544,1554 ----
        case MXP_BEGc:
          bInTag = TRUE;
          if (bMXP)
+           {
+           memcpy (pd, MXPMODE (1), 4);
+           pd += 4;
            *pd++ = '<';
+           }
          break;
  
        case MXP_ENDc:    /* shouldn't get this case */



Amended on Thu 09 Aug 2001 05:52 AM by Nick Gammon
#2
I installed this patch and it works almost flawlessly,
the only thing I've noticed is that occasionaly it will show this.

&lt;26055hp 29788m 1014mv&gt; &lt;#10533&gt;

whereas my normal prompt is:

<26055hp 29788m 1014mv> <#10533>
Australia Forum Administrator #3
This is with zMUD? Sounds like it didn't go into secure mode for some reason.
#4
yeah it's with zmud 6.16.
It also does it when you type equipment or look at another player.

I also received this message when installing the patch with cygwin, in WindowsXP


$ patch -p5 < zmudfix.patch
missing header for context diff at line 3 of patch
(Stripping trailing CRs from patch.)
patching file comm.c
Hunk #1 succeeded at 1468 (offset 2 lines).
Hunk #2 succeeded at 1546 (offset 2 lines).
Amended on Wed 27 Aug 2003 10:13 PM by Yourdrunkendad
Australia Forum Administrator #5
First try using MUSHclient in a similar session. If the bug does not appear you have a zMUD bug, pure and simple. Thus, fiddling with the server code won't help any.
USA #6
Heh. Would it be inappropriate to mention that Zmud *IS* the bug? :P