fixed some bugs
This commit is contained in:
parent
576e82aa6b
commit
10bbfc54b5
@ -159,7 +159,7 @@ class IRCClient(object):
|
|||||||
self.command_handler[command](self, *largs)
|
self.command_handler[command](self, *largs)
|
||||||
elif "" in self.command_handler:
|
elif "" in self.command_handler:
|
||||||
self.command_handler[""](self, command, *largs)
|
self.command_handler[""](self, command, *largs)
|
||||||
except CommandError:
|
finally:
|
||||||
# error will of already been logged by the handler
|
# error will of already been logged by the handler
|
||||||
pass
|
pass
|
||||||
|
|
||||||
|
4
vars.py
4
vars.py
@ -16,8 +16,8 @@ GAME_MODES = {}
|
|||||||
|
|
||||||
############################################################################################
|
############################################################################################
|
||||||
# ROLE INDEX: PLAYERS SEER WOLF CURSED DRUNK HARLOT TRAITOR GUNNER CROW #
|
# ROLE INDEX: PLAYERS SEER WOLF CURSED DRUNK HARLOT TRAITOR GUNNER CROW #
|
||||||
ROLES_GUIDE = { 4 : ( 1 , 1 , 0 , 0 , 0 , 0 , 0 , 0), #
|
ROLES_GUIDE = { 4 : ( 0 , 1 , 0 , 0 , 0 , 0 , 2 , 0), #
|
||||||
6 : ( 0 , 1 , 0 , 5 , 0 , 0 , 5 , 0), #
|
6 : ( 0 , 1 , 0 , 0 , 0 , 0 , 4 , 0), #
|
||||||
8 : ( 1 , 2 , 1 , 1 , 1 , 0 , 0 , 0), #
|
8 : ( 1 , 2 , 1 , 1 , 1 , 0 , 0 , 0), #
|
||||||
10 : ( 1 , 2 , 1 , 1 , 1 , 1 , 1 , 0)} #
|
10 : ( 1 , 2 , 1 , 1 , 1 , 1 , 1 , 0)} #
|
||||||
############################################################################################
|
############################################################################################
|
||||||
|
@ -302,6 +302,8 @@ def chk_win(cli):
|
|||||||
cli.msg(chan, "No more players remaining. Game ended.")
|
cli.msg(chan, "No more players remaining. Game ended.")
|
||||||
reset(cli)
|
reset(cli)
|
||||||
return True
|
return True
|
||||||
|
if vars.PHASE == "join":
|
||||||
|
return True
|
||||||
elif (len(vars.ROLES["wolf"])+
|
elif (len(vars.ROLES["wolf"])+
|
||||||
len(vars.ROLES["traitor"])+
|
len(vars.ROLES["traitor"])+
|
||||||
len(vars.ROLES["werecrow"])) >= lpl / 2:
|
len(vars.ROLES["werecrow"])) >= lpl / 2:
|
||||||
@ -417,7 +419,7 @@ def del_player_lynch(cli, nick):
|
|||||||
|
|
||||||
|
|
||||||
@hook("ping")
|
@hook("ping")
|
||||||
def on_ping(cli, prefix, server):
|
def on_ping(cli, server):
|
||||||
cli.send('PONG', server)
|
cli.send('PONG', server)
|
||||||
|
|
||||||
|
|
||||||
@ -800,6 +802,8 @@ def see(cli, nick, rest):
|
|||||||
|
|
||||||
@pmcmd("")
|
@pmcmd("")
|
||||||
def relay(cli, nick, rest):
|
def relay(cli, nick, rest):
|
||||||
|
if vars.PHASE != "night":
|
||||||
|
return
|
||||||
badguys = vars.ROLES["wolf"] + vars.ROLES["traitor"] + vars.ROLES["werecrow"]
|
badguys = vars.ROLES["wolf"] + vars.ROLES["traitor"] + vars.ROLES["werecrow"]
|
||||||
if len(badguys) > 1:
|
if len(badguys) > 1:
|
||||||
if vars.get_role(nick) in ("wolf","traitor","werecrow"):
|
if vars.get_role(nick) in ("wolf","traitor","werecrow"):
|
||||||
|
Loading…
Reference in New Issue
Block a user