From d9a8a40864ed6990be3203baca8edef4353dcb07 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Tue, 19 Jul 2011 23:05:10 -0500 Subject: [PATCH] make the end-game messages aware of nick changes that occur during the game --- wolfgame.py | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/wolfgame.py b/wolfgame.py index e2d4c22..a1f0ae8 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -747,6 +747,12 @@ def on_nick(cli, prefix, nick): var.USERS.remove(prefix) var.USERS.append(nick) + opl = [] + for k,v in var.ORIGINAL_ROLES.items(): + if prefix in v: + var.ORIGINAL_ROLES[k].remove(prefix) + var.ORIGINAL_ROLES[k].append(nick) + break if prefix in var.list_players(): r = var.ROLES[var.get_role(prefix)]