From 6d943450185309189d25ebdffaa43ab7351d83b2 Mon Sep 17 00:00:00 2001 From: Jeremy Stanley Date: Tue, 28 Jun 2016 07:46:08 +0000 Subject: [PATCH] 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. --- lib/mudpy/misc.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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)") -- 2.11.0