Enhance: allow Server to ECHO for us - to allow hiding of password entry#2236
Conversation
We now allow the Server to negotiate the Telnet ECHO (1) sub-option so that he may provide the echoing of text we send to him. The accepted practice is that if he is doing that we will not do it ourself (to prevent doubled lines) - and this is normally done during the sending of passwords so that he does not actually echo anything (or perhaps sends back only asterisks) so as to hide the entry on our screen. This overrides the effect of our former "Echo the text you send in the display box" setting. So that this is made obvious when it is happening that control has been moved to a checkable toolbutton to the left of the command line on the main TConsole for a profile. Importantly it shows a new blue icon I have made (from part of the Oxygen icon set icon: "mail-reply-sender") which is show if the option is enabled and a grey version to show if the control is disabled. Whilst the Server is performing any echoing however the control changes from the blue icon to a "dialog-warning" yellow-triangular icon instead which is to alert the user that what they type will NOT be shown on screen. This will not show if the option is switched off because then there is no difference in behaviour. A suitable tooltip is provided in all instances so that the user can find out what this feature is indicating in it's current state. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Nice, we needed this! But I don't think the echo mode indicator is that important that we should use up screen real estate on it. UI team, thoughts? |
|
I think we need it because the user will want (or need) to know that suddenly what they type may not be what gets shown on the main console when they press enter. Remember for that (hopefully short) time it is up to the game server as to what (if anything) gets shown in response to what they sent - typically it will not show anything but it is at liberty to put up anything... Now, if the user does not normally echo what they type to be sent to the screen, they will not be concerned - so the icon will stay as the grey one whichever end is doing the echoing. It is also a tele-tell initially that I have correctly handled the ECHO option negotiation - I think I have got it right - but if that triangle stays showing past a password entry than it will give a warning that I have cocked something up - you know how, um, sensitive that part of the code base is! 😜 |
|
Good idea not to display and log the password. I think nobody will argue. However not acceptable to have this indicated in such prominent position. The area next to the command line seems for very important information or toggles. Understandable to place this there during debugging but not for regular use. It also seems somewhat superfluous. Most users will understand automatically that passwords are not shown and may be confused by too much information indeed. What is more, remember us hiding the buttons to the right? This is what users wanted. Other users are modifying the application style as a whole. Some ask about moving the command line elsewhere. The trend is clear: Block as little predefined screen area as possible. Make the rest as configurable as possible. |
|
Oh, and putting it next to where the user is typing feels sort of consistent to me (the reflected arrow symbol sort of says something about what is happening - though I would like it to be a tiny bit bigger - to take up a larger part of the rectangular 96x96 pixmap - or perhaps we need to get our new icon person on the case 😉 for a better/larger rendition.) The above was written before I saw @Kebap 's response. That does, disappoint me a little 😢 - I worked hard to get a control and an indicator combined and working there and I was pleased with it - but I guess not everyone has the wide screen(s) that I use and wants an indicator. So I am going to need to rip that part out and put the control back on the preferences, oh well, back to the code-face. ⚒️ Oh, hang-on - how about if it was included in the command-line, like the search options are in the search term entry box in the Editor? No, that is not going to be any more pleasing to the UI minimalists... |
Following peer-review it was intimated that having a UI element taking up space in the command line area was unwanted. This commit undoes the part that added the combine control and indicator and reverts back to the checkbox on the preferences dialogue. I have updated the tooltip for that control to indicate that it's effects when enabled can be suppressed by the game server. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
|
Right - the UI aspect is gone - you will just have to watch the debug output to see the Server negotiating the ECHO option for him being turned on and off - and spot text not showing up when it did before! Doing this has made the overall changeset much smaller and simpler! 😉 |
|
Thanks for the quick update! Hooray for more simple changesets! I am very sorry if I was causing any disappointment. Indeed, I know even a few people who do not play Mudlet in fullscreen, just windowed mode, but also with multi-view enabled. It makes sense to keep buttons low in number for that use case. If there really comes a desire to know more, we can surely add those buttons, because that functionality of both displaying information as well as being toggleable is quite nice. Then again, it could also be realised as sort of an overlay, maybe even in lua by grabbing events. That is to not use up real screen estate. Just thinking out loud here. Maybe that is the lesson learned here: Let's maybe ponder and settle bigger intended changes before actually putting in the work of implementing them, so no work is wasted that way. |
|
I guess it doesn't need review by @Mudlet/ui-review now! 😆 |
keneanung
left a comment
There was a problem hiding this comment.
Looks ok to me. Initially, I found the logic a bit backwards, but here the extended comment helps quite a bit!
|
Where can this be tested? Did not seem to work in Achaea, password is shown and debug output is: |
|
That is odd - it worked for me on WoTMUD (back when the UI element was present - I got the password wrong and until I got it right on the third attempt the icon was the triangle and then when back to the blue echo.) Analysing the messages:
1 is our response to his IAC WILL ECHO - where we send IAC DO ECHO and switch off our echoing of what we type Are you saying that the password was shown on the main display (the |
|
Yes, our debug messages are confusing here because that message 3 is used any time that he sends a WONT and the corresponding bit in the If you compare the code with what I might cheekily call upstream at https://github.com/KDE/kmuddy/blob/master/kmuddy/ctelnet.cpp you can see that KMuddy does set/clear them...! 😮 |
|
It is shown in the display |
|
Maybe it's just Achaea that is bad - StickMUD seems to be OK. However, if I reconnect in the middle of this echo off, the echoes don't get turned back on. |
vadi2
left a comment
There was a problem hiding this comment.
Good to merge after the bugfix.
|
I have replaced the (possibly misleading) messages and replaced them, using a new helper to identify all the protocol numbers I could determine so that instead there is a uniform Having removed my username and password from my Achaea test account I cleared my Qt Creator application output and annotated the output at each stage: Started a reconnect: Server asks for our user name: Sent username: Server asks for our password: Password sent: Login happens...! I repeated the test with break points on the point where the WILL and WONT ECHOs are processed, neither of them were hit until AFTER I sent the password. Conclusion: Acheae is broken in that it is not sending IAC WILL ECHO before it asks for the password... |
|
OK, sounds good. |
Some of the messages do not make sense for some options. Like the one that says we do not want to enable one of OUR options when the Server is actually informing us that his is disabling one of HIS options that were previously active. Removed the previously ambiguous #define `DEBUG` and merged it with the `DEBUG_TELNET` - now it will turn on the display of WILL/WONT/DO/DONT if defined and some extra details if defined as greater than 1. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
Um, what do you mean by that - I have pushed a further commit which removes some potentially misleading messages and ensured that all the options being negotiated are identified and each DO/DONT/WILL/WONT is displayed in the debug output (if |
|
If you reconnect while server has turned off echoes, state is not reset and echoes are off. |
|
Merging so we can get a build out for testers - the small state reset bugfix can be in a follow-up PR. |
💡 Raised as an issue in #2249 Okay, let me see if I can quickly find a suitable place to reset it on disconnect/reconnect... |
Following a discussion in the "#coding" channel in the MUD guild on Discord: https://canary.discord.com/channels/279748146316312576/359062772337606656/1187507352346304583 I pointed out that Mudlet does not respond to the AYT command. This PR fixes that so that it immediately responds (with one of a number of random text phrases) when it gets that command - which should fulfil the requirements for that. It also increases the number of Telnet commands that get reported (to all of them) in debug output - including the AYT one. To see them it will be necessary to changed the `DEBUG_TELNET` #define from the `1` it had been left as (perhaps it should have been left undefined after Mudlet#2236 was merged) to `2`. Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
#### Motivation for adding to Mudlet Following a discussion in the "#coding" channel in the MUD guild on Discord: https://canary.discord.com/channels/279748146316312576/359062772337606656/1187507352346304583 I pointed out that Mudlet does not respond to the AYT command. #### Brief overview of PR changes/additions This PR fixes that so that it immediately responds (with "YES") when it gets that command - which should fulfil the requirements for that command. It also increases the number of Telnet commands that get reported (to all of them) in debug output - including the AYT one. To see them it will be necessary to changed the `DEBUG_TELNET` #define from the `1` it had been left as (perhaps it should have been left undefined after #2236 was merged) to `2`. #### Other info (issues closed, discussion etc) None --------- Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
#### Motivation for adding to Mudlet Following a discussion in the "#coding" channel in the MUD guild on Discord: https://canary.discord.com/channels/279748146316312576/359062772337606656/1187507352346304583 I pointed out that Mudlet does not respond to the AYT command. #### Brief overview of PR changes/additions This PR fixes that so that it immediately responds (with "YES") when it gets that command - which should fulfil the requirements for that command. It also increases the number of Telnet commands that get reported (to all of them) in debug output - including the AYT one. To see them it will be necessary to changed the `DEBUG_TELNET` #define from the `1` it had been left as (perhaps it should have been left undefined after Mudlet#2236 was merged) to `2`. #### Other info (issues closed, discussion etc) None --------- Signed-off-by: Stephen Lyons <slysven@virginmedia.com>
With this PR we now allow the Server to negotiate the Telnet ECHO (1) sub-option so that he may provide the echoing of text we send to him. The accepted practice is that if he is doing that we will not do it ourself (to prevent doubled lines) - and this is normally done during the sending of passwords so that he does not actually echo anything (or perhaps sends back only asterisks) so as to hide the entry on our screen.
This overrides the effect of our former "Echo the text you send in the display box" setting. So that this is made obvious when it is happening that control has been moved to a checkable toolbutton to the left of the command line on the main
TConsolefor a profile. Importantly it shows a new blue icon I have made (from part of the Oxygen icon set icon: "mail-reply-sender") which is shown if the option is enabled and a grey version to show if the control is disabled. Whilst the Server is performing any echoing however the control changes from the blue icon to a "dialog-warning" yellow triangular icon instead which is to alert the user that what they type will NOT be shown on screen. This will not show if the option is switched off because then there is no difference in behaviour.A suitable tooltip is provided in all instances so that the user can find out what this feature is indicating in it's current state.
tl;dr; Mudlet will not longer show password entries on screen or in log files - and it will give you warning when what you type will not be copied up to the console and allow you to switch the echoing option on and off without having to go into the preferences (so handy for producing sample output screen shots, mayhaps? 😉 ).
P.S. This should close #620 (from April 2010) and also close #1381 (from me from over a year ago). 😀
Signed-off-by: Stephen Lyons slysven@virginmedia.com