From 1b6d00d136dd58268cf3eaca3caf130181b401e4 Mon Sep 17 00:00:00 2001 From: jcao219 Date: Sun, 10 Jul 2011 15:09:43 -0500 Subject: [PATCH] adjusted rate limit, fixed bug --- oyoyo/client.py | 2 +- wolfgame.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/oyoyo/client.py b/oyoyo/client.py index dde27b6..2ca169a 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -107,7 +107,7 @@ class IRCClient(object): self.port = None self.connect_cb = None self.blocking = True - self.tokenbucket = TokenBucket(3, 7.3) + self.tokenbucket = TokenBucket(3, 1.63) self.__dict__.update(kwargs) self.command_handler = cmd_handler diff --git a/wolfgame.py b/wolfgame.py index 0f31a47..0976092 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -365,7 +365,7 @@ def hurry_up(cli, gameid=0): if gameid: if gameid != var.DAY_ID: return - + var.DAY_ID = 0 chan = botconfig.CHANNEL pl = var.list_players() @@ -807,6 +807,7 @@ def transition_day(cli, gameid=0): if gameid: if gameid != var.NIGHT_ID: return + var.NIGHT_ID = 0 print("Day is starting...") var.PHASE = "day" var.GOATED = False @@ -1207,8 +1208,8 @@ def investigate(cli, nick, rest): var.INVESTIGATED.append(nick) cli.msg(nick, ("The results of your investigation have returned. \u0002{0}\u0002"+ - " is a... \u0002{1}\u0002").format(victim, var.get_role(victim))) - if random.random < 0.4: # a 2/5 chance (should be changeable in settings) + " is a... \u0002{1}\u0002!").format(victim, var.get_role(victim))) + if random.random() < 0.4: # a 2/5 chance (should be changeable in settings) # Reveal his role! for badguy in var.ROLES["wolf"] + var.ROLES["werecrow"] + var.ROLES["traitor"]: cli.msg(badguy, ("\0002{0}\0002 accidentally drops a paper. The paper reveals "+