From fc0dc82cf08096e42d9a0d82b9a80fe9ff8d2b73 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Sun, 15 Aug 2021 13:51:58 +0000 Subject: [PATCH] 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. --- mudpy/misc.py | 2 ++ 1 file changed, 2 insertions(+) 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() -- 2.11.0