Fix the room-alias condition of details in the tutorial. Resolves #981.

This commit is contained in:
Griatch 2016-06-15 22:48:19 +02:00
parent ddd9387777
commit 86096c3c74

View file

@ -154,7 +154,10 @@ class CmdTutorialLook(default_cmds.CmdLook):
# ourself. This also means the search function will always
# return a list (with 0, 1 or more elements) rather than
# result/None.
looking_at_obj = caller.search(args, use_nicks=True, quiet=True)
looking_at_obj = caller.search(args,
# note: excludes room/room aliases
candidates=caller.location.contents + caller.contents,
use_nicks=True, quiet=True)
if len(looking_at_obj) != 1:
# no target found or more than one target found (multimatch)
# look for a detail that may match