Fix bug in contrib.rpsystem's emote multimatch display.
This commit is contained in:
parent
164a28308c
commit
c8909b4b67
1 changed files with 2 additions and 3 deletions
|
|
@ -379,7 +379,6 @@ def parse_sdescs_and_recogs(sender, candidates, string, search_mode=False):
|
||||||
bestmatches = [(obj, text) for score, obj, text in matches if maxscore == score != -1]
|
bestmatches = [(obj, text) for score, obj, text in matches if maxscore == score != -1]
|
||||||
nmatches = len(bestmatches)
|
nmatches = len(bestmatches)
|
||||||
|
|
||||||
|
|
||||||
if not nmatches:
|
if not nmatches:
|
||||||
# no matches
|
# no matches
|
||||||
obj = None
|
obj = None
|
||||||
|
|
@ -418,8 +417,8 @@ def parse_sdescs_and_recogs(sender, candidates, string, search_mode=False):
|
||||||
refname = marker_match.group()
|
refname = marker_match.group()
|
||||||
reflist = ["%s%s%s (%s%s)" % (inum+1, _NUM_SEP,
|
reflist = ["%s%s%s (%s%s)" % (inum+1, _NUM_SEP,
|
||||||
_RE_PREFIX.sub("", refname), text,
|
_RE_PREFIX.sub("", refname), text,
|
||||||
" (%s)" % sender.key if sender == obj else "")
|
" (%s)" % sender.key if sender == ob else "")
|
||||||
for inum, (obj, text) in enumerate(bestmatches) if score == maxscore]
|
for inum, (ob, text) in enumerate(obj)]
|
||||||
errors.append(_EMOTE_MULTIMATCH_ERROR.format(
|
errors.append(_EMOTE_MULTIMATCH_ERROR.format(
|
||||||
ref=marker_match.group(), reflist="\n ".join(reflist)))
|
ref=marker_match.group(), reflist="\n ".join(reflist)))
|
||||||
if search_mode:
|
if search_mode:
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue