prevent certain debug mode crashes
This commit is contained in:
parent
ce6351dd82
commit
4a959597a7
@ -111,7 +111,7 @@ def connect_callback(cli):
|
||||
if botconfig.JOIN_AFTER_CLOAKED:
|
||||
prepare_stuff = hook("event_hosthidden", hookid=294)(prepare_stuff)
|
||||
else:
|
||||
prepare_stuff = hook("event_hosthidden", hookid=294)(prepare_stuff)
|
||||
prepare_stuff = hook("endofmotd", hookid=294)(prepare_stuff)
|
||||
|
||||
@hook("mode")
|
||||
def check_if_identified(cli, spam, egg, m, *etc):
|
||||
|
@ -59,6 +59,7 @@ var.ORIGINAL_SETTINGS = {}
|
||||
var.LAST_SAID_TIME = {}
|
||||
|
||||
var.GAME_START_TIME = datetime.now() # for idle checker only
|
||||
var.CAN_START_TIME = 0
|
||||
var.GRAVEYARD_LOCK = threading.RLock()
|
||||
var.GAME_ID = 0
|
||||
|
||||
@ -280,7 +281,7 @@ def pinger(cli, nick, chan, rest):
|
||||
var.PINGING = False
|
||||
|
||||
minimum = datetime.now() + timedelta(seconds=var.PING_MIN_WAIT)
|
||||
if var.CAN_START_TIME < minimum:
|
||||
if not var.CAN_START_TIME or var.CAN_START_TIME < minimum:
|
||||
var.CAN_START_TIME = minimum
|
||||
|
||||
decorators.unhook(HOOKS, 800)
|
||||
@ -1543,7 +1544,7 @@ def shoot(cli, nick, chann_, rest):
|
||||
|
||||
wolfshooter = nick in var.ROLES["wolf"]+var.ROLES["werecrow"]+var.ROLES["traitor"]
|
||||
|
||||
if wolfshooter:
|
||||
if wolfshooter and nick in var.WOLF_GUNNERS:
|
||||
var.WOLF_GUNNERS[nick] -= 1
|
||||
else:
|
||||
var.GUNNERS[nick] -= 1
|
||||
|
Loading…
Reference in New Issue
Block a user