From 9acb95727f33a4b3637fbf913b9fd0d927b51ae9 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Fri, 8 Jul 2011 12:26:50 -0500 Subject: [PATCH] fixed bug in PART/QUIT/KICK handlers --- var.py | 8 ++++---- wolfgame.py | 7 ++++--- 2 files changed, 8 insertions(+), 7 deletions(-) diff --git a/var.py b/var.py index c04ea33..61f5d74 100644 --- a/var.py +++ b/var.py @@ -1,11 +1,11 @@ PING_WAIT = 300 # Seconds -MINIMUM_WAIT = 0 # debug, change to 60 for normal -EXTRA_WAIT = 0 +MINIMUM_WAIT = 60 # debug, change to 60 for normal +EXTRA_WAIT = 20 MAXIMUM_WAITED = 2 # limit for amount of !wait's MAX_SHOTS = 2 DRUNK_SHOTS_MULTIPLIER = 3 -NIGHT_TIME_LIMIT = 0 -DAY_TIME_LIMIT = 0 +NIGHT_TIME_LIMIT = 90 +DAY_TIME_LIMIT = 333 START_WITH_DAY = False # HIT MISS SUICIDE diff --git a/wolfgame.py b/wolfgame.py index ed083f9..9c77ea7 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -527,9 +527,10 @@ def leave(cli, what, nick): cmd("!leave")(lambda cli, nick, *rest: leave(cli, "!leave", nick)) cmd("!quit")(lambda cli, nick, *rest: leave(cli, "!quit", nick)) -hook("part")(lambda cli, prefix, nick, *rest: leave(cli, "part", nick)) -hook("quit")(lambda cli, prefix, nick, *rest: leave(cli, "quit", nick)) -hook("kick")(lambda cli, prefix, nick, *rest: leave(cli, "kick", nick)) +#Functions decorated with hook do not parse the nick by default +hook("part")(lambda cli, nick, *reset: leave(cli, "part", parse_nick(nick)[0])) +hook("quit")(lambda cli, nick, *rest: leave(cli, "quit", parse_nick(nick)[0])) +hook("kick")(lambda cli, nick, *rest: leave(cli, "kick", parse_nick(nick)[0]))