Make !vote/!v work as an alias for !game in the join phase

This commit is contained in:
nyuszika7h 2015-01-14 19:47:13 +01:00
parent 431ebe86d3
commit adb039e83d

View File

@ -3283,8 +3283,8 @@ def no_lynch(cli, nick, chan, rest):
chk_decision(cli)
return
@cmd("lynch", "vote", "v", game=True, playing=True, pm=True)
def vote(cli, nick, chan, rest):
@cmd("lynch", game=True, playing=True, pm=True)
def lynch(cli, nick, chan, rest):
"""Use this to vote for a candidate to be lynched."""
if not rest:
show_votes(cli, nick, chan, rest)
@ -6490,6 +6490,17 @@ def game_help(args=''):
else gamemode for gamemode in var.GAME_MODES.keys() if gamemode != "roles"])
game.__doc__ = game_help
@cmd("vote", "v", raw_nick=True, pm=True)
def vote(cli, raw_nick, chan, rest):
nick = parse_nick(raw_nick)[0]
if var.PHASE == "join" and chan != nick:
return game(cli, raw_nick, chan, rest)
else:
return lynch(cli, nick, chan, rest)
@cmd("fpull", admin_only=True, pm=True)
def fpull(cli, nick, chan, rest):
"""Pulls from the repository to update the bot."""