Skip leading symbols in complete_match

This allows you to vote |evil| with "!v evil", for example, provided
that no other nick matches that.
This commit is contained in:
nyuszika7h 2015-07-22 16:11:38 +02:00
parent d26c621b55
commit 22faf0b961

View File

@ -321,7 +321,7 @@ def complete_match(string, matches):
for possible in matches:
if string == possible:
return string, 1
if possible.startswith(string):
if possible.startswith(string) or possible.lstrip("[{\\^_`|}]").startswith(string):
bestmatch = possible
num_matches += 1
if num_matches != 1: