MUSHclient responds oddly to telnet negotiation

Posted by ThomasWatts on Sun 11 Nov 2007 10:51 PM — 4 posts, 16,669 views.

USA #0
The following is the debugging output of just part of telnet negotiation between the server I am coding (mentioned in other threads under SMAUG), and MUSHclient. The string 'mushclient' is when responding to the query of if it WILL accept compressed responses from the server.
Server send IAC, WILL, COMPRESS2 (MCCP version 2)
MUSHclient respondes with the following:

Sun Nov 11 18:41:23 2007 :: [*****] BUG: ²V(3)
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 0
Sun Nov 11 18:41:23 2007 :: [*****] BUG: Type = 253, Command = 86
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 3
Sun Nov 11 18:41:23 2007 :: [*****] BUG: 0
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 4
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 4
Sun Nov 11 18:41:23 2007 :: [*****] BUG: m
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 5
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 5
Sun Nov 11 18:41:23 2007 :: [*****] BUG: u
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 6
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 6
Sun Nov 11 18:41:23 2007 :: [*****] BUG: s
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 7
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 7
Sun Nov 11 18:41:23 2007 :: [*****] BUG: h
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 8
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 8
Sun Nov 11 18:41:23 2007 :: [*****] BUG: c
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 9
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 9
Sun Nov 11 18:41:23 2007 :: [*****] BUG: l
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 10
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 10
Sun Nov 11 18:41:23 2007 :: [*****] BUG: i
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 11
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 11
Sun Nov 11 18:41:23 2007 :: [*****] BUG: e
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 12
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 12
Sun Nov 11 18:41:23 2007 :: [*****] BUG: n
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 13
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 13
Sun Nov 11 18:41:23 2007 :: [*****] BUG: t
Sun Nov 11 18:41:23 2007 :: [*****] BUG: I = 14
Sun Nov 11 18:41:23 2007 :: [*****] BUG: Type = SE
Sun Nov 11 18:41:23 2007 :: [*****] BUG: J = 16

It all boils down to MUSHclient responding with an affirmative to compression, but also sends either the client name or terminal type and terminates the IAC with SE. However, I'm pretty sure no negotiation (SB) should take place here. I'll go read the RFC again, but I think all MUSHclient should respond with is IAC DO COMPRESS2 then a NULL character.
Australia Forum Administrator #1
I can't reproduce this, perhaps you have sent the negotiation for terminal type earlier on?

You can test simply enough, first turn on Edit -> Debug Packets. That will then show in an editor window all incoming and outgoing packets.

Then go into "debug simulated world input" (Ctrl+Shift+F12) and enter:


\FF\FB\56


That is, IAC, WILL, COMPRESS2.

Then hit OK to send it.

Now look at your debug packets window. This is what I got:



Incoming packet: 5 (3 bytes)

ÿûV                ff fb 56

Sent  packet: 6 (3 bytes)

ÿýV                ff fd 56


You can see I sent IAC, WILL, COMPRESS2 and received IAC, DO, COMPRESS2.

It is not correct that you would expect a NULL character.
USA #2
Sorry, meant to say a terminated string
\0
.

I just ditched the multiple messages and sent a single message, the telnet clients I am testing with all support this properly and my server sends it correctly. I checked using the debug and MUSH said it was coming from my server, even though my code never specifically sent it. May be a problem with not flushing the output properly on server side.
Amended on Mon 12 Nov 2007 09:46 PM by Nick Gammon
Australia Forum Administrator #3
You will probably find the terminal type query hidden away where you don't expect it, for example in the "welcome" message.