Update wild child's idol when they change nick

Closes #249.
This commit is contained in:
nyuszika7h 2016-10-27 20:42:11 +02:00
parent 430b73ef33
commit a0092b981f

View File

@ -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: