From 9b2f662fa0942e22bccbe1b023c68190abfb3203 Mon Sep 17 00:00:00 2001 From: James Scott Date: Mon, 17 Dec 2012 19:53:22 -0500 Subject: [PATCH] fixed the numrounds not being passed to the game object. also fixed voting past the max. --- plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index 45d3120..647cb73 100644 --- a/plugin.py +++ b/plugin.py @@ -297,7 +297,7 @@ class Cah(callbacks.Plugin): if len(args) < 1: numrounds = 5 else: - numrounds = args[0] + numrounds = int(args[0]) if channel in self.games: irc.reply("There is a game running currently.") @@ -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 > game.cardsPlayed: + elif vote > len(game.cardsPlayed): raise ValueError else: game.voted.append(msg.nick)