From a0092b981f3c7a0149fa740c303b262f0d66c784 Mon Sep 17 00:00:00 2001 From: nyuszika7h Date: Thu, 27 Oct 2016 20:42:11 +0200 Subject: [PATCH] Update wild child's idol when they change nick Closes #249. --- src/roles/wildchild.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/roles/wildchild.py b/src/roles/wildchild.py index 755e692..d5374cb 100644 --- a/src/roles/wildchild.py +++ b/src/roles/wildchild.py @@ -45,6 +45,10 @@ def on_rename(evt, cli, var, prefix, nick): WILD_CHILDREN.remove(prefix) WILD_CHILDREN.add(nick) + for (wildchild, idol) in IDOLS.items(): + if idol == prefix: + IDOLS[wildchild] = nick + @event_listener("exchange_roles") def on_exchange(evt, cli, var, actor, nick, actor_role, nick_role): if actor_role == "wolf" and actor in WILD_CHILDREN and nick not in WILD_CHILDREN: