From: Jeremy Stanley Date: Sun, 15 Aug 2021 13:51:58 +0000 (+0000) Subject: Adjust Telnet echo state on connection replacement X-Git-Tag: 0.4.1~4 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=fc0dc82cf08096e42d9a0d82b9a80fe9ff8d2b73 Adjust Telnet echo state on connection replacement When a new connection authenticates for the same account as an established one, we jump straight from the password entry state to whatever state the old connection was in. Because password entry disables local echo in order to hide the user's input from the screen, we need to make sure that the new connection's Telnet options are copied to the user object and then inject a negotiation to cause the Telnet stack to normalize to the echo setting for the new state. --- diff --git a/mudpy/misc.py b/mudpy/misc.py index 5270acd..f94c2a8 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -655,6 +655,8 @@ class User: old_user.connection = self.connection old_user.last_address = old_user.address old_user.address = self.address + old_user.telopts = self.telopts + old_user.adjust_echoing() # take this one out of the list and delete self.remove()