]> jfr.im git - erebus.git/blobdiff - modules/trivia.py
help - if nofakelag, showcommands should send the list instead of URL
[erebus.git] / modules / trivia.py
index 30ec6047060483c5f14bb4840b3a18eb27832452..af0ff7fb1c4a8c571d4d045ca19fa7a4cd9edf1b 100644 (file)
@@ -271,7 +271,7 @@ class TriviaState(object):
 
        def endPointVote(self):
                self.getchan().msg("Voting has ended!")
-               votelist = sorted(self.voteamounts.items(), key=lambda item: item[1]) #sort into list of tuples: [(option, number_of_votes), ...]
+               votelist = sorted(self.voteamounts.items(), key=lambda item: (item[1], -item[0])) #sort into list of tuples: [(option, number_of_votes), ...]
                for i in range(len(votelist)-1):
                        item = votelist[i]
                        self.getchan().msg("%s place: %s (%s votes)" % (len(votelist)-i, item[0], item[1]))