mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-05-06 11:33:42 -05:00
Merge pull request #30 from rootcoma/master
linking stats page to users pages
This commit is contained in:
commit
63f7cc52c8
@ -139,7 +139,7 @@
|
||||
foreach($result as $key=>$res) {
|
||||
echo '<tr>';
|
||||
echo '<td>' . ($key+1) . '</td>';
|
||||
echo '<td>' . $res['username'] . '</td>';
|
||||
echo '<td><a href="user.php?username=' . $res['username'] . '">' . $res['username'] . '</a></td>';
|
||||
echo '<td>' . $res['points'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -194,7 +194,7 @@
|
||||
foreach($result as $key=>$res) {
|
||||
echo '<tr>';
|
||||
echo '<td>' . ($key+1) . '</td>';
|
||||
echo '<td>' . $res['username'] . '</td>';
|
||||
echo '<td><a href="user.php?username=' . $res['username'] . '">' . $res['username'] . '</a></td>';
|
||||
echo '<td>' . $res['points'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -235,7 +235,7 @@
|
||||
foreach($result as $key=>$res) {
|
||||
echo '<tr>';
|
||||
echo '<td>' . ($key+1) . '</td>';
|
||||
echo '<td>' . $res['username'] . '</td>';
|
||||
echo '<td><a href="user.php?username=' . $res['username'] . '">' . $res['username'] . '</a></td>';
|
||||
echo '<td>' . $res['points'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
@ -276,7 +276,7 @@
|
||||
foreach($result as $key=>$res) {
|
||||
echo '<tr>';
|
||||
echo '<td>' . ($key+1) . '</td>';
|
||||
echo '<td>' . $res['username'] . '</td>';
|
||||
echo '<td><a href="user.php?username=' . $res['username'] . '">' . $res['username'] . '</a></td>';
|
||||
echo '<td>' . $res['points'] . '</td>';
|
||||
echo '</tr>';
|
||||
}
|
||||
|
14
plugin.py
14
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
|
||||
@ -909,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)/2)) / (self.registryValue('timeout', self.channel) * 3))
|
||||
charMask = self.registryValue('charMask', self.channel)
|
||||
if len(self.answers) > 1 or len(self.answers) < 1:
|
||||
return
|
||||
@ -922,11 +921,12 @@ class TriviaTime(callbacks.Plugin):
|
||||
return hints
|
||||
|
||||
def getOtherHint(self, username):
|
||||
if username in self.shownOtherHint:
|
||||
if self.questionOver:
|
||||
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:
|
||||
@ -944,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:
|
||||
@ -971,7 +970,6 @@ class TriviaTime(callbacks.Plugin):
|
||||
self.questionOver = False
|
||||
self.shownHint = False
|
||||
self.skipVoteCount = {}
|
||||
self.shownOtherHint = {}
|
||||
self.question = ''
|
||||
self.answers = []
|
||||
self.alternativeAnswers = []
|
||||
|
Loading…
x
Reference in New Issue
Block a user