Protocol Negotiation Issues
- Ornir
-
Topic Author
- Offline
- New Member
- Posts: 3
- Thank you received: 0
Thanks!
- Ornir Elunari
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
What's the quickest way to reproduce this issue? I tried creating a character and roaming around but couldn't get to a place where background colors were used.
Luminari will now show in the app Game Center. it won't show up in listings until you add a description and image.
Please Log in or Create an account to join the conversation.
- Ornir
-
Topic Author
- Offline
- New Member
- Posts: 3
- Thank you received: 0
The wilderness is still in development and there is no easy way to get there from the mud proper.
- Ornir Elunari
Please Log in or Create an account to join the conversation.
- hawgpadre
-
- Offline
- New Member
- Posts: 6
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Luminari is doing <ANSI Foreground Color><ANSI Invert> instead of setting the background color directly.
I wasn't able to reach a wilderness on Wayfar but it looks like it could be the same issue.
Please Log in or Create an account to join the conversation.
- hawgpadre
-
- Offline
- New Member
- Posts: 6
- Thank you received: 0
One other thing I've noticed:
#-5457 from (mudportal websocket proxy) > client mudportal.comclient_version 1.0client_ip 63.233.133.4E[**Vco swampdog ******
This first line sent by the web client is not terminated with a newline, so the first time you try to login (co swampdog *****) the client identifier line is all jumbled up with your login and the login fails.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
For the ANSI background map, try setting the background colors without using the invert code (7). Invert doesn't make it clear what you want the foreground color to be. This may have the result you expect on some clients, but not on others.
You can set background colors by sending codes #40-47, as per: en.wikipedia.org/wiki/ANSI_escape_code
The Portal app also supports 256-color codes, including background colors. The wiki link above covers those as well.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Tijer wrote: that change has made the 256 colors stop working entirely on my test mud!! And my main mud also!!!
When you're reporting issues, please remember to share the quickest way to reproduce.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
using the portal app...
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
looks as if the actual protocols are not being negotiated by the mudportal plugin, used to work...
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Here's what you should be getting as TTYPE on connect:
"mudportal.com", "ANSI-256COLOR", "MTTS 141", <user IP>
The second and the third entry both should declare 256-color support. Let me know if you think the issue is on my end.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
will point out that the negotiation works on zMUD, cMUD and Mushclient... just hasnt since the first response on this thread by me (if that gives you a little idea as to when the issue started)
if you connect to my mud.. and type finger (on your own character) it should show the following if protocols are supported:
Client: MUSHclient (Version: 4.91).
Protocols: NAWS, TTYPE, 256 Colours, MXP (0.5), MCCP.
Screen Size: 271 characters wide and 60 characters high.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
never get past password entry screen...
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
IAC WILL TELOPT_ECHO,
IAC WILL TELOPT_SGA,
IAC DO TELOPT_TTYPE,
IAC DO TELOPT_NAWS,
IAC DO TELOPT_NEW_ENVIRON,
IAC WILL TELOPT_MSSP,
And all it gets back from the client is:
IAC WILL 201
IAC DO 69
IAC DO 86
(LO doesn't support those protos and they aren't in arpa/telnet.h so I don't have a decode for what they are.)
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Also, now it should be sending client info via MSDP as well on connect, including the user IP.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
IAC WILL 201
IAC WILL 91
IAC WILL TTYPE
IAC SB TTYPE IS mudportal.com IAC SE
IAC WILL TTYPE
IAC SB TTYPE IS XTERM-256color IAC SE
IAC WILL TTYPE
IAC SB TTYPE IS MTTS 141 IAC SE
IAC WILL TTYPE
IAC SB TTYPE IS 69.181.111.151 IAC SE
IAC WILL TTYPE
IAC SB TTYPE IS 69.181.111.151 IAC SE
IAC DO 86
Im still not seeing NAWS or ECHO or SGA negotiation. Should I be?
LO only asks for a TTYPE with a SEND when it gets a WILL TTYPE, and it won't ask for more than one ttype, so I suspect you are sending the WILL TTYPE's gratuitously after sending a TTYPE value instead of waiting for the next request from the server. Is that what is going on? My game can certainly deal with that, but for compatibility, RFC 1091 section 5 says that "Terminal type information may not be sent spontaneously, but only in response to a request."
In Mud Terminal Type Standard , the section on proxies suggests sending the IP address as a NEW-ENVIRON variable named IPADDRESS, rather than appending it as another ttype value. I think that recommendation is a lot easier to parse on the server, and its already how I've implemented address reporting for the LO proxy. Would be cool if mudportal did it that way.
I'm totally going to implement full mtts on the LO server if the mudportal client is using it. Very cool, plamzi.
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Regarding TTYPE, when I follow RFC1091 to the letter, the processing of multiple ttypes fails in Godwars derivatives. What works is if I send the first TTYPE after handshake, then wait for the server to ask for more, then preface additional responses with IAC WILL TTYPE. Right now, this seems to please everyone, unless you are having issues with it (let me know).
NAWS seems pretty useless to me given how the ScrollView works and the much richer abilities to control how text flows on the client side. Let me know if you disagree.
I started reading the Suppress Go Ahead RFC but my head began to hurt
AFAIK, MTTS is not very widespread, which is why we have to do the above gymnastics w/ TTYPE to tell certain servers that 256 colors are supported.
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
When a server sends WILL ECHO and WILL SGA to a client, the is server trying to tell the client that it can support char-at-a-time mode-- like the mode what happens with a typical telnet or ssh cli shell session. In that mode, user types a character, and the client sends it immediately to the server without displaying it to the user. The server receives the character and decides whether to send it back to the client for display to the user. The server gets every keystroke and completely controls what is displayed back to the user.
Like a lot of (most?) mud servers, the mudportal client operates in a line-at-a-time mode. User enters a line of text, the client takes care of the line editing and character printing, and a complete line is sent up to the server only when the user hits enter. The server isn't supposed to echo the line back to the client for printing, because the client has already taken care of it.
My understanding is that when a server offers to provide ECHO and SGA by sending a WILL for those options, a client like mudportal that wants to stay in line-at-a-time mode has two options- either don't respond at all to either offer because line-at-a-time is supposed to be the default behavior, or respond with a DONT to explicitly refuse the offers.
Having the client respond with a DO ECHO isn't right, because the client has already shown the input line to the user. The server shouldn't try to do it too.
Setting the IPADDRESS variable via NEW-ENVIRON looks like it is working great on my end!
Thanks for the explanation on the TTYPE behavior. I understand now why you are doing it that way, and I'll fix my server side code to be more tolerant.
On NAWS- Its not useless. Muds that support the option use it to determine how many lines to display before sending the "hit return to continue" message in a pager, and some muds use it to decide when to wrap text. For example, LO uses it to decide how big of an ascii graphic map it can send to the user when they ask for one. LO and stock dikumuds default to an 80x24 size when there's no negotiation, so its not a big deal if the client doesn't support NAWS- but it means that paged text has a 'hit return' prompt after every 22 lines. Even if you don't ever want to support vt100 cursor positioning commands, it'd be a nice option to include in the client.
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
The client wraps lines automatically and also lets people change the font on the fly. This means that the window size is not enough information to decide how many lines to display or how long the lines should be, etc. I could come up with some sort of formula to calculate approx. number of visible lines, and characters per line, but to me it feels like pouring work into the wrong thing.
I'm really not aiming to build a full-featured telnet terminal. I'm much more interested in helping devs think beyond telnet and unlock the full potential of a browser. For instance, I'd like to add MXP custom window support so a server can easily drive the whole contents of a help file into a separate window for the user to read at their leisure.
If you have web-based help files, or any other kind of web-accessible content, you can already dock that in an iframe for people to browse on the side.
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
On the NAWS subject- I get what you are trying to do. I'm just saying that as nothing more than a concession to compatibility, It might be a useful thing to negotiate the window size to get the server side pager prompts and line wrapping to happen more reasonably. At least it would be there as a fallback until game devs can utilize the cooler browser functionality.
As a server developer I don't think NAWS is useless, but if its low on the priority list for the client code, so be it.
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
I will just say that before the changes you made mudportal app was working fine... apart from being sent random characters when it was negotiating the protocols on connection.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Tijer wrote: Hate to say this Plamzi.. but what ever you have done to the mud portal app recently has made background colors no longer show on my mud... nor protocols getting negotiated properly (my mud MAY be down sporadicly... we have some issues we are working though)
Things look fine to me on godwars.net:2770 right now. I see background color on the splash screen, and 256 colors when I 'finger' my character. Maybe you looked while I was still tinkering earlier (I make changes to the proxy at runtime).
Tijer wrote: I will just say that before the changes you made mudportal app was working fine... apart from being sent random characters when it was negotiating the protocols on connection.
Well, bombing every server with protocol requests was good enough for the initial roll-out, but now the list of games is growing, and it's causing issues with some games. I'm making everything nice and clean, which means that things that used to work on some servers may stop working, temporarily. If that happens, just report it, give me enough details to reproduce, and all will be well very quickly, I promise.
Please Log in or Create an account to join the conversation.
- Tijer
-
- Offline
- Senior Member
- Posts: 41
- Thank you received: 0
Please Log in or Create an account to join the conversation.
- Splork
-
- Offline
- New Member
- Posts: 5
- Thank you received: 0
I am attaching a screenshot of my display.
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
When the server (the receiver of the TERMINAL-TYPE IS) receives the same response two consecutive times, this indicates the end of the list of available types. Similarly, the client should indicate it has sent all available names by repeating the last one sent.
I use KaVir's snippet as well, and the version I use seems to store the first TTYPE while scanning the rest for info on 256-color support, etc. I'm not sure if you did modifications to yours or if your version behaves differently, but I think the portal app follows the RFC--it's just probably one of the few clients that actually cycle through multiple TTYPEs in order to give servers as much information as possible.
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Plamzi, instead of setting the environment variable named {IPADDRESS} to {1.2.3.4}, the client is setting variable { "IPADDRESS" } to { "1.2.3.4" }. Both the variable name and its value are being sent with a surrounding double quote and space. I don't think its supposed to be that way. The quotes and spaces aren't supposed to be sent by the client, are they?
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
The NEW-ENVIRON RFC and MTTS are both not very clear on the quotes thing.
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
I agree with you on the RFC. Might have been clear as a bell in 1983, but today it's just confusing.
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.
- plamzi
-
- Away
- Administrator
- Posts: 285
- Thank you received: 42
Please Log in or Create an account to join the conversation.
- RahjIII
-
- Offline
- New Member
- Posts: 13
- Thank you received: 0
Terminal: mudportal.com (80 x 25) (noecho/nosga)
Full TTYPE: mudportal.com, XTERM-256color, MTTS 141, 69.xxx.xxx.151
MTTS Decode: ANSI, UTF-8, 256 COLORS, PROXY
IPADDRESS = 69.xxx.xxx.151
The Last Outpost
last-outpost.com:23
Please Log in or Create an account to join the conversation.