From: Jeremy Stanley Date: Tue, 28 Jun 2016 07:46:08 +0000 (+0000) Subject: Strip extra separators in show element command X-Git-Tag: 0.0.1~185 X-Git-Url: https://mudpy.org/gitweb?p=mudpy.git;a=commitdiff_plain;h=6d943450185309189d25ebdffaa43ab7351d83b2;hp=381d70d0d1d4b80e89acc46435031ed9c9547374 Strip extra separators in show element command Eat leading and trailing "." separators in the show element command, so that it will consistently search the element set for the corresponding simplified element names. --- diff --git a/lib/mudpy/misc.py b/lib/mudpy/misc.py index b3f2e25..1dc6b3d 100644 --- a/lib/mudpy/misc.py +++ b/lib/mudpy/misc.py @@ -2183,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)")