fixed -1 or 0 as a voting option.

This commit is contained in:
James Scott 2012-12-17 19:54:14 -05:00
parent 9b2f662fa0
commit 5577bb691d
1 changed files with 1 additions and 1 deletions

View File

@ -349,7 +349,7 @@ class Cah(callbacks.Plugin):
if game.voting:
if msg.nick in game.voted:
irc.reply("You already voted! This isn't Chicago!")
elif vote > len(game.cardsPlayed):
elif vote > len(game.cardsPlayed) or vote < 1:
raise ValueError
else:
game.voted.append(msg.nick)