From 5a3311aa9954def9ddf10ab6d9ed07411af7ce0d Mon Sep 17 00:00:00 2001 From: "Vgr E.Barry" Date: Sat, 7 Mar 2015 23:12:41 -0500 Subject: [PATCH] Make 'immunize' not fail if doctor is not in var.DOCTORS --- modules/wolfgame.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/modules/wolfgame.py b/modules/wolfgame.py index 32142a5..000c518 100644 --- a/modules/wolfgame.py +++ b/modules/wolfgame.py @@ -4620,6 +4620,8 @@ def immunize(cli, nick, chan, rest): if nick in var.DOCTORS and var.DOCTORS[nick] == 0: pm(cli, nick, "You have run out of immunizations.") return + if not nick in var.DOCTORS: # something with amnesiac or clone or exchange totem + var.DOCTORS[nick] = math.ceil(var.DOCTOR_IMMUNIZATION_MULTIPLIER * len(var.ALL_PLAYERS)) victim = get_victim(cli, nick, re.split(" +",rest)[0], True) if not victim: return