From 7376fe54ea3bcb20f8a7bd1fcba7809784915d14 Mon Sep 17 00:00:00 2001 From: Yizhe Shen Date: Tue, 26 Aug 2014 22:04:48 -0400 Subject: [PATCH] Fix to allow player_stats to be case-insensitive for nicks. --- modules/wolfgame.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 5d46587..39734fa 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -5565,10 +5565,12 @@ def player_stats(cli, nick, chan, rest): user = nick # Find the player's account if possible - if user in var.USERS: - acc = var.USERS[user]['account'] + luser = user.lower() + lusers = {k.lower(): v for k, v in var.USERS.items()} + if luser in lusers: + acc = lusers[luser]['account'] if acc == '*': - if user == nick: + if luser == nick.lower(): cli.notice(nick, 'You are not identified with NickServ.') else: cli.notice(nick, user + ' is not identified with NickServ.')