From f552a6e86e4a646a66f3881912d014a85ac1a92a Mon Sep 17 00:00:00 2001 From: William Maduno | Diitto Date: Wed, 2 Dec 2015 18:46:52 -0800 Subject: [PATCH] Fixes #184 (!swap, when targeting someone, should be case insensitive) --- src/wolfgame.py | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/src/wolfgame.py b/src/wolfgame.py index 291443b..79ab48d 100644 --- a/src/wolfgame.py +++ b/src/wolfgame.py @@ -767,7 +767,15 @@ def replace(cli, nick, chan, rest): cli.notice(nick, msg) return else: - target, _ = complete_match(rest[0], var.list_players() + list(var.VENGEFUL_GHOSTS.keys())) + pl = var.list_players() + list(var.VENGEFUL_GHOSTS.keys()) + pll = [var.irc_lower(i) for i in pl] + + lc_target, _ = complete_match(var.irc_lower(rest[0]), pll) + + if lc_target != None: + target = pl[pll.index(lc_target)] + else: + target = "" if target not in var.list_players() and target not in var.VENGEFUL_GHOSTS: msg = messages["target_not_playing"].format(" longer" if target in var.DEAD else "t")