From b27dc11a161bea59aa50cb9d41538d0eea4118e8 Mon Sep 17 00:00:00 2001 From: rootcoma Date: Wed, 6 Nov 2013 13:11:26 -0800 Subject: [PATCH 1/5] linking stats page to users pages --- php/stats.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/php/stats.php b/php/stats.php index b07a624..c0ce295 100644 --- a/php/stats.php +++ b/php/stats.php @@ -139,7 +139,7 @@ foreach($result as $key=>$res) { echo ''; echo '' . ($key+1) . ''; - echo '' . $res['username'] . ''; + echo '' . $res['username'] . ''; echo '' . $res['points'] . ''; echo ''; } @@ -194,7 +194,7 @@ foreach($result as $key=>$res) { echo ''; echo '' . ($key+1) . ''; - echo '' . $res['username'] . ''; + echo '' . $res['username'] . ''; echo '' . $res['points'] . ''; echo ''; } @@ -235,7 +235,7 @@ foreach($result as $key=>$res) { echo ''; echo '' . ($key+1) . ''; - echo '' . $res['username'] . ''; + echo '' . $res['username'] . ''; echo '' . $res['points'] . ''; echo ''; } @@ -276,7 +276,7 @@ foreach($result as $key=>$res) { echo ''; echo '' . ($key+1) . ''; - echo '' . $res['username'] . ''; + echo '' . $res['username'] . ''; echo '' . $res['points'] . ''; echo ''; } From 3d6fb4b713d7ea4e74685c885406b2ab4e0a9fee Mon Sep 17 00:00:00 2001 From: rootcoma Date: Wed, 6 Nov 2013 13:36:45 -0800 Subject: [PATCH 2/5] adding check for end of question for other hint '.' --- plugin.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/plugin.py b/plugin.py index 232f0ed..c1c3950 100644 --- a/plugin.py +++ b/plugin.py @@ -922,6 +922,8 @@ class TriviaTime(callbacks.Plugin): return hints def getOtherHint(self, username): + if self.questionOver: + return if username in self.shownOtherHint: return self.shownOtherHint[username] = True From 79a09e8f42179e992979774dcda2366c2816358f Mon Sep 17 00:00:00 2001 From: rootcoma Date: Wed, 6 Nov 2013 15:15:52 -0800 Subject: [PATCH 3/5] Updating show other hint to match bogus trivia, only one other hint per hint --- plugin.py | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/plugin.py b/plugin.py index c1c3950..7dd7c29 100644 --- a/plugin.py +++ b/plugin.py @@ -656,7 +656,6 @@ class TriviaTime(callbacks.Plugin): # reset stats self.shownHint = False self.skipVoteCount = {} - self.shownOtherHint = {} self.streak = 0 self.lastWinner = '' self.hintsCounter = 0 @@ -924,11 +923,10 @@ class TriviaTime(callbacks.Plugin): def getOtherHint(self, username): if self.questionOver: return - if username in self.shownOtherHint: - return - self.shownOtherHint[username] = True - if len(self.answers) == 1: - self.sendMessage(self.getOtherHintString()) + if self.shownHint == False: + self.shownHint = True + if len(self.answers) == 1: + self.sendMessage(self.getOtherHintString()) def getRemainingKAOS(self): if len(self.answers) > 1: @@ -946,7 +944,6 @@ class TriviaTime(callbacks.Plugin): self.sendMessage('Hint %s: %s' % (self.hintsCounter, hints), 1, 9) #reset hint shown self.shownHint = False - self.shownOtherHint = {} timeout = 2 if len(self.answers) > 1: @@ -973,7 +970,6 @@ class TriviaTime(callbacks.Plugin): self.questionOver = False self.shownHint = False self.skipVoteCount = {} - self.shownOtherHint = {} self.question = '' self.answers = [] self.alternativeAnswers = [] From 36ad7a4d3d92581521521bbb28c750ef5c7f9a5b Mon Sep 17 00:00:00 2001 From: rootcoma Date: Wed, 6 Nov 2013 15:28:21 -0800 Subject: [PATCH 4/5] changing how much other hint is showed --- plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 7dd7c29..34a84d7 100644 --- a/plugin.py +++ b/plugin.py @@ -908,7 +908,7 @@ class TriviaTime(callbacks.Plugin): hintRatio = self.registryValue('hintShowRatio') # % to show each hint ratio = float(hintRatio * .01) timeElapsed = float(time.time() - self.askedAt) - showPercentage = float((timeElapsed + (self.registryValue('timeout', self.channel)/2)) / (self.registryValue('timeout', self.channel) * 2)) + showPercentage = float((timeElapsed + (self.registryValue('timeout', self.channel)/3)) / (self.registryValue('timeout', self.channel) * 3)) charMask = self.registryValue('charMask', self.channel) if len(self.answers) > 1 or len(self.answers) < 1: return From c037b7601a12385398171d6cbdc026246d906eb3 Mon Sep 17 00:00:00 2001 From: rootcoma Date: Wed, 6 Nov 2013 15:33:09 -0800 Subject: [PATCH 5/5] further tweaks to other hint --- plugin.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin.py b/plugin.py index 34a84d7..fd8a77d 100644 --- a/plugin.py +++ b/plugin.py @@ -908,7 +908,7 @@ class TriviaTime(callbacks.Plugin): hintRatio = self.registryValue('hintShowRatio') # % to show each hint ratio = float(hintRatio * .01) timeElapsed = float(time.time() - self.askedAt) - showPercentage = float((timeElapsed + (self.registryValue('timeout', self.channel)/3)) / (self.registryValue('timeout', self.channel) * 3)) + showPercentage = float((timeElapsed + (self.registryValue('timeout', self.channel)/2)) / (self.registryValue('timeout', self.channel) * 3)) charMask = self.registryValue('charMask', self.channel) if len(self.answers) > 1 or len(self.answers) < 1: return