diff --git a/oyoyo/client.py b/oyoyo/client.py index 37d2fd8..d10bcdc 100644 --- a/oyoyo/client.py +++ b/oyoyo/client.py @@ -159,7 +159,7 @@ class IRCClient(object): self.command_handler[command](self, *largs) elif "" in self.command_handler: self.command_handler[""](self, command, *largs) - except CommandError: + finally: # error will of already been logged by the handler pass diff --git a/vars.py b/vars.py index e0b0079..069b83c 100644 --- a/vars.py +++ b/vars.py @@ -16,8 +16,8 @@ GAME_MODES = {} ############################################################################################ # ROLE INDEX: PLAYERS SEER WOLF CURSED DRUNK HARLOT TRAITOR GUNNER CROW # -ROLES_GUIDE = { 4 : ( 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0), # - 6 : ( 0 , 1 , 0 , 5 , 0 , 0 , 5 , 0), # +ROLES_GUIDE = { 4 : ( 0 , 1 , 0 , 0 , 0 , 0 , 2 , 0), # + 6 : ( 0 , 1 , 0 , 0 , 0 , 0 , 4 , 0), # 8 : ( 1 , 2 , 1 , 1 , 1 , 0 , 0 , 0), # 10 : ( 1 , 2 , 1 , 1 , 1 , 1 , 1 , 0)} # ############################################################################################ diff --git a/wolfgame.py b/wolfgame.py index c719c04..291a2da 100644 --- a/wolfgame.py +++ b/wolfgame.py @@ -302,6 +302,8 @@ def chk_win(cli): cli.msg(chan, "No more players remaining. Game ended.") reset(cli) return True + if vars.PHASE == "join": + return True elif (len(vars.ROLES["wolf"])+ len(vars.ROLES["traitor"])+ len(vars.ROLES["werecrow"])) >= lpl / 2: @@ -417,7 +419,7 @@ def del_player_lynch(cli, nick): @hook("ping") -def on_ping(cli, prefix, server): +def on_ping(cli, server): cli.send('PONG', server) @@ -800,6 +802,8 @@ def see(cli, nick, rest): @pmcmd("") def relay(cli, nick, rest): + if vars.PHASE != "night": + return badguys = vars.ROLES["wolf"] + vars.ROLES["traitor"] + vars.ROLES["werecrow"] if len(badguys) > 1: if vars.get_role(nick) in ("wolf","traitor","werecrow"):