From 4bb70b05e882907314b9633be6dc5bb788f1ef22 Mon Sep 17 00:00:00 2001 From: James Scott Date: Sun, 16 Dec 2012 20:36:55 -0500 Subject: [PATCH] I think I finally fixed it --- plugin.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/plugin.py b/plugin.py index b78dad0..980f552 100644 --- a/plugin.py +++ b/plugin.py @@ -112,7 +112,7 @@ class Cah(callbacks.Plugin): canidatesById.append(nick) for canidateNumber, count in votes.iteritems(): - canidate = canidatesById[canidateNumber] + canidate = canidatesById[int(canidateNumber)] if len(winningCanidate) == 0: winningCanidate.append((canidate, count)) elif winningCanidate[0][1] < count: @@ -122,7 +122,7 @@ class Cah(callbacks.Plugin): winningCanidate.append((canidate, count)) if len(winningCanidate) > 0: - return (winningCanidate[randint(0, len(ties) -1)], True) + return (winningCanidate[randint(0, len(winningCanidate) -1)], True) return (winningCanidate[0], False)