mirror of
https://github.com/evennia/evennia.git
synced 2026-03-16 21:06:30 +01:00
Don't allow recog:ing a masked person
This commit is contained in:
parent
bbe4a6925a
commit
9df7eb49b0
1 changed files with 8 additions and 5 deletions
|
|
@ -708,12 +708,15 @@ class RecogHandler(object):
|
|||
than `max_length`.
|
||||
|
||||
"""
|
||||
if not obj.access(self.obj, "enable_recog", default=True):
|
||||
raise SdescError("This person is unrecognizeable.")
|
||||
|
||||
# strip emote components from recog
|
||||
recog = _RE_REF.sub(r"\1",
|
||||
_RE_REF_LANG.sub(r"\1",
|
||||
_RE_SELF_REF.sub(r"",
|
||||
_RE_LANGUAGE.sub(r"",
|
||||
_RE_OBJ_REF_START.sub(r"", recog)))))
|
||||
recog = _RE_REF.sub(
|
||||
r"\1", _RE_REF_LANG.sub(
|
||||
r"\1", _RE_SELF_REF.sub(
|
||||
r"", _RE_LANGUAGE.sub(
|
||||
r"", _RE_OBJ_REF_START.sub(r"", recog)))))
|
||||
|
||||
# make an recog clean of ANSI codes
|
||||
cleaned_recog = ansi.strip_ansi(recog)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue