X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=blobdiff_plain;f=lib%2Fmudpy%2Fmisc.py;h=1dc6b3da9af334bc6e068235db853f98a4b3bfd8;hp=c0845c5a7c8045d9b61f5a7df0fd8d49c96a2476;hb=6d943450185309189d25ebdffaa43ab7351d83b2;hpb=49f76e99340119c5bd403a05913531aed07e5e9b diff --git a/lib/mudpy/misc.py b/lib/mudpy/misc.py index c0845c5..1dc6b3d 100644 --- a/lib/mudpy/misc.py +++ b/lib/mudpy/misc.py @@ -908,8 +908,7 @@ class User: # log non-printable characters remaining if mudpy.telnet.is_enabled(self, mudpy.telnet.TELOPT_BINARY, mudpy.telnet.HIM): - asciiline = b"".join( - filter(lambda x: b" " <= x <= b"~", line)) + asciiline = bytes([x for x in line if 32 <= x <= 126]) if line != asciiline: logline = "Non-ASCII characters from " if self.account and self.account.get("name"): @@ -2184,8 +2183,8 @@ def command_show(actor, parameters): elif arguments[0] == "element": if len(arguments) != 2: message = "You must specify one element." - elif arguments[1] in universe.contents: - element = universe.contents[arguments[1]] + elif arguments[1].strip(".") in universe.contents: + element = universe.contents[arguments[1].strip(".")] message = ("These are the properties of the \"" + arguments[1] + "\" element (in \"" + element.origin.filename + "\"):$(eol)")