From a79108583cd5337e8a6c452f2c4bcca3ebf2cf22 Mon Sep 17 00:00:00 2001 From: Griatch Date: Sat, 4 Jun 2016 13:12:08 +0200 Subject: [PATCH] rpsystem contrib: Made the recog/sdesc matching for normal objects also handle objects with multi-word keys or aliases --- evennia/contrib/rpsystem.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/evennia/contrib/rpsystem.py b/evennia/contrib/rpsystem.py index a70555fd0b..5443011461 100644 --- a/evennia/contrib/rpsystem.py +++ b/evennia/contrib/rpsystem.py @@ -235,7 +235,7 @@ def regex_tuple_from_key_alias(obj): (ordered_permutation_regex, obj, key/alias) """ - return (re.compile(r"/%s|%s" % (obj.key, "|".join("/%s" % obj for obj in obj.aliases.all())), _RE_FLAGS), + return (re.compile(ordered_permutation_regex(" ".join([obj.key] + obj.aliases.all())), _RE_FLAGS), obj, obj.key)