X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=lib%2Fmudpy%2Fmisc.py;h=41d3ab67cbed83a4cf6f9dbc66ddcfbe341d96ba;hp=0843586852ac90cdc56067597df660773297f798;hb=d8917a25f912911288217da7b601ff6330c8fcdb;hpb=b6b6478cf56b8d0defd158868c91f88c150313ed diff --git a/lib/mudpy/misc.py b/lib/mudpy/misc.py index 0843586..41d3ab6 100644 --- a/lib/mudpy/misc.py +++ b/lib/mudpy/misc.py @@ -840,14 +840,14 @@ class User: if self.output_queue: try: self.connection.send(self.output_queue[0]) - del self.output_queue[0] except BrokenPipeError: if self.account and self.account.get("name"): account = self.account.get("name") else: account = "an unknown user" - log("Broken pipe sending to %s." % account, 7) self.state = "disconnecting" + log("Broken pipe sending to %s." % account, 7) + del self.output_queue[0] def enqueue_input(self): """Process and enqueue any new input.""" @@ -2043,7 +2043,9 @@ def command_say(actor, parameters): universe.categories["internal"]["language"].get( "default_punctuation")) action = "" - for mark in actions.keys(): + + # reverse sort punctuation options so the longest match wins + for mark in sorted(actions.keys(), reverse=True): if not literal and message.endswith(mark): action = actions[mark] break