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`.
|
than `max_length`.
|
||||||
|
|
||||||
"""
|
"""
|
||||||
|
if not obj.access(self.obj, "enable_recog", default=True):
|
||||||
|
raise SdescError("This person is unrecognizeable.")
|
||||||
|
|
||||||
# strip emote components from recog
|
# strip emote components from recog
|
||||||
recog = _RE_REF.sub(r"\1",
|
recog = _RE_REF.sub(
|
||||||
_RE_REF_LANG.sub(r"\1",
|
r"\1", _RE_REF_LANG.sub(
|
||||||
_RE_SELF_REF.sub(r"",
|
r"\1", _RE_SELF_REF.sub(
|
||||||
_RE_LANGUAGE.sub(r"",
|
r"", _RE_LANGUAGE.sub(
|
||||||
_RE_OBJ_REF_START.sub(r"", recog)))))
|
r"", _RE_OBJ_REF_START.sub(r"", recog)))))
|
||||||
|
|
||||||
# make an recog clean of ANSI codes
|
# make an recog clean of ANSI codes
|
||||||
cleaned_recog = ansi.strip_ansi(recog)
|
cleaned_recog = ansi.strip_ansi(recog)
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue