Added telnet option ECHO, so that server can request no local echo on client. Related with feature request #540

This commit is contained in:
Duarte Cordeiro 2014-09-18 14:53:34 +01:00
parent 9ed8e92c71
commit efd2eeafb8
2 changed files with 19 additions and 5 deletions

View file

@ -88,6 +88,7 @@ class CmdUsernameSelect(Command):
else:
# store the player so next step can find it
self.menutree.player = player
self.caller.msg("", switchecho="off")
self.menutree.goto("node1b")
@ -103,6 +104,7 @@ class CmdPasswordSelectBack(Command):
def func(self):
"Execute the command"
self.menutree.goto("node1a")
self.caller.msg("", switchecho="on")
class CmdPasswordSelect(Command):
@ -114,6 +116,7 @@ class CmdPasswordSelect(Command):
def func(self):
"Execute the command"
self.caller.msg("", switchecho="on")
if not hasattr(self.menutree, "player"):
self.caller.msg("{rSomething went wrong! The player was not remembered from last step!{n")
self.menutree.goto("node1a")
@ -178,6 +181,7 @@ its and @/./+/-/_ only.{n") # this echoes the restrictions made by django's auth
return
# store the name for the next step
self.menutree.playername = playername
self.caller.msg("", switchecho="off")
self.menutree.goto("node2b")
@ -190,6 +194,7 @@ class CmdPasswordCreateBack(Command):
def func(self):
"Execute the command"
self.caller.msg("", switchecho="on")
self.menutree.goto("node2a")
@ -201,6 +206,7 @@ class CmdPasswordCreate(Command):
def func(self):
"Execute the command"
password = self.args
self.caller.msg("", switchecho="on")
if not hasattr(self.menutree, 'playername'):
self.caller.msg("{rSomething went wrong! Playername not remembered from previous step!{n")
self.menutree.goto("node2a")