From cc7af63b3d2f32ea1cd566d09f2181a8a4e23e66 Mon Sep 17 00:00:00 2001 From: Matthias Meusburger Date: Mon, 10 Sep 2012 20:11:33 +0200 Subject: [PATCH] No need to tell the score at the end of a hunt if it is a perfect. --- plugin.py | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/plugin.py b/plugin.py index 621938d..8b817e5 100644 --- a/plugin.py +++ b/plugin.py @@ -793,16 +793,18 @@ class DuckHunt(callbacks.Plugin): else: maxShoots = 10 - # Showing scores - #irc.reply("Winner: %s with %i points" % (winnernick, winnerscore)) - #irc.reply(self.scores.get(currentChannel)) - #TODO: Better display - irc.reply(sorted(self.scores.get(currentChannel).iteritems(), key=lambda (k,v):(v,k), reverse=True)) - # Is there a perfect? if (winnerscore == maxShoots): irc.reply("\o/ %s: %i ducks out of %i: perfect!!! +%i \o/" % (winnernick, winnerscore, maxShoots, self.perfectbonus)) self.scores[currentChannel][winnernick] += self.perfectbonus + else: + # Showing scores + #irc.reply("Winner: %s with %i points" % (winnernick, winnerscore)) + #irc.reply(self.scores.get(currentChannel)) + #TODO: Better display + irc.reply(sorted(self.scores.get(currentChannel).iteritems(), key=lambda (k,v):(v,k), reverse=True)) + + # Getting channel best time (to see if the best time of this hunt is better) channelbestnick = None