don't print how many players are abstaining when abstaining is disabled

This commit is contained in:
jacob1 2015-02-28 01:28:06 -05:00
parent f7f8b7687e
commit 0ebb4d5e36

View File

@ -1727,9 +1727,11 @@ def show_votes(cli, nick, chan, rest):
plural = " has" plural = " has"
else: else:
plural = "s have" plural = "s have"
the_message = ('{}\u0002{}\u0002 players, \u0002{}\u0002 votes ' the_message = ("{}\u0002{}\u0002 players, \u0002{}\u0002 votes "
'required to lynch, \u0002{}\u0002 players available to ' "required to lynch, \u0002{}\u0002 players available to "
'vote. \u0002{}\u0002 player{} refrained from voting.').format(_nick, len(pl), votesneeded, avail, not_voting, plural) "vote.").format(_nick, len(pl), votesneeded, avail)
if var.ABSTAIN_ENABLED:
the_message += " \u0002{}\u0002 player{} refrained from voting.".format(not_voting, plural)
if chan == nick: if chan == nick:
pm(cli, nick, the_message) pm(cli, nick, the_message)
@ -3620,7 +3622,7 @@ def no_lynch(cli, nick, chan, rest):
"""Allows you to abstain from voting for the day.""" """Allows you to abstain from voting for the day."""
if chan == botconfig.CHANNEL: if chan == botconfig.CHANNEL:
if not var.ABSTAIN_ENABLED: if not var.ABSTAIN_ENABLED:
cli.notice(nick, "This command has been disabled by the admins.") cli.notice(nick, "This command has been disabled.")
return return
elif var.LIMIT_ABSTAIN and var.ABSTAINED: elif var.LIMIT_ABSTAIN and var.ABSTAINED:
cli.notice(nick, "The village has already abstained once this game and may not do so again.") cli.notice(nick, "The village has already abstained once this game and may not do so again.")