From: Jeremy Stanley Date: Sun, 8 Jul 2018 18:55:53 +0000 (+0000) Subject: Rename "initial" state to "telopt_negotiation" X-Git-Tag: 0.0.1~73 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=b054ba768010f5a9b17f16c06f87d11ea98465e1;hp=54423d0151eebde19eaeb7bb32fd2368e9e6319e Rename "initial" state to "telopt_negotiation" There was a rare race where if a client disconnected during the initial Telnet option negotiation pause, an attempt to log an entry about it would raise an exception because the "initial" state placeholder in the default menu data was incorrectly-named. Fix that, and rename the state to "telopt_negotiation" so it's less confusing to debug if similar issues are discovered with this state in the future. --- diff --git a/mudpy/misc.py b/mudpy/misc.py index 66d97a8..3cd8e64 100644 --- a/mudpy/misc.py +++ b/mudpy/misc.py @@ -525,7 +525,7 @@ class User: self.output_queue = [] self.partial_input = b"" self.password_tries = 0 - self.state = "initial" + self.state = "telopt_negotiation" self.telopts = {} def quit(self): @@ -806,7 +806,7 @@ class User: self.check_idle() # if output is paused, decrement the counter - if self.state == "initial": + if self.state == "telopt_negotiation": if self.negotiation_pause: self.negotiation_pause -= 1 else: diff --git a/share/menu.yaml b/share/menu.yaml index 2f756b0..07a4601 100644 --- a/share/menu.yaml +++ b/share/menu.yaml @@ -108,7 +108,7 @@ menu.entering_new_password.prompt: 'Enter a new password for "$(account)":' menu.entering_new_password.error_differs: The two passwords did not match. Try again... -menu.active.initial: +menu.telopt_negotiation.prompt: menu.main_utility.action_c: user.new_avatar() menu.main_utility.branch_a: activate_avatar