From 22faf0b96151e6e4143295629e1433b3c883be88 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Wed, 22 Jul 2015 16:11:38 +0200 Subject: [PATCH] Skip leading symbols in complete_match This allows you to vote |evil| with "!v evil", for example, provided that no other nick matches that. --- src/wolfgame.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/wolfgame.py b/src/wolfgame.py index cfb7bcc..1a095f1 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -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: