evennia / evennia

Python MUD/MUX/MUSH/MU* development system
http://www.evennia.com
BSD 3-Clause "New" or "Revised" License
1.8k stars 696 forks source link

Feature Request: Non-Echoing Prompts #540

Closed kalanac closed 10 years ago

kalanac commented 10 years ago

OK, this could be a little vague so I'll give some examples of what I mean.

When you log in to a linux system, you type your username and you see each character as you type. Then it asks for your password but you don't see the characters as they are typed.

Many MUDs I've played have this same functionality. It's not a massive issue, but it does increase the security of peoples passwords by stopping people looking over their shoulder.

This document: http://www.graysage.com/cg/MUD/CGMud/telnet.txt describes how this effect is achieved by the telnet protocol.

It would be nice to be able to specify a non-echoing prompt from the evennia code for passwords and similar. At a minimum it would be nice to see a login module that does this for the password, but I imagine the flexibility of having other non-echoing prompts elsewhere in some ones game might be handy. I think there is also a way to have telnet clients fire off each character to the server as they are typed which might be handy for numbered or single character menu interfaces.

duartecordeiro commented 10 years ago

Tried to test this by doing the following changes to telnet.py, at the end of the file:

def data_out(self, text=None, **kwargs):
[...]
    echomode= kwargs.get("echomode")
[...]
    if echomode:
            if echomode=="No":
                self.sendLine(IAC+WILL+ECHO)
                self.transport.write(mccp_compress(self, IAC + WILL+ ECHO))
            else: #echomode=="Yes"
                self.sendLine(IAC+WONT+ECHO)
                self.transport.write(mccp_compress(self, IAC + WONT+ ECHO))

I don't know enough of evennia to get it working. Followed this page for setting ECHO ON/OFF: http://cryosphere.net/mud-protocol.html

Griatch commented 10 years ago

This is implemented in revision b5507b0fcb81501f57ede8ac1c64689b3bc0fe67.