mirror of
https://github.com/oddluck/limnoria-plugins.git
synced 2025-05-07 03:53:44 -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) {
|
foreach($result as $key=>$res) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . ($key+1) . '</td>';
|
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 '<td>' . $res['points'] . '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
@ -194,7 +194,7 @@
|
|||||||
foreach($result as $key=>$res) {
|
foreach($result as $key=>$res) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . ($key+1) . '</td>';
|
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 '<td>' . $res['points'] . '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
@ -235,7 +235,7 @@
|
|||||||
foreach($result as $key=>$res) {
|
foreach($result as $key=>$res) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . ($key+1) . '</td>';
|
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 '<td>' . $res['points'] . '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
@ -276,7 +276,7 @@
|
|||||||
foreach($result as $key=>$res) {
|
foreach($result as $key=>$res) {
|
||||||
echo '<tr>';
|
echo '<tr>';
|
||||||
echo '<td>' . ($key+1) . '</td>';
|
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 '<td>' . $res['points'] . '</td>';
|
||||||
echo '</tr>';
|
echo '</tr>';
|
||||||
}
|
}
|
||||||
|
14
plugin.py
14
plugin.py
@ -656,7 +656,6 @@ class TriviaTime(callbacks.Plugin):
|
|||||||
# reset stats
|
# reset stats
|
||||||
self.shownHint = False
|
self.shownHint = False
|
||||||
self.skipVoteCount = {}
|
self.skipVoteCount = {}
|
||||||
self.shownOtherHint = {}
|
|
||||||
self.streak = 0
|
self.streak = 0
|
||||||
self.lastWinner = ''
|
self.lastWinner = ''
|
||||||
self.hintsCounter = 0
|
self.hintsCounter = 0
|
||||||
@ -909,7 +908,7 @@ class TriviaTime(callbacks.Plugin):
|
|||||||
hintRatio = self.registryValue('hintShowRatio') # % to show each hint
|
hintRatio = self.registryValue('hintShowRatio') # % to show each hint
|
||||||
ratio = float(hintRatio * .01)
|
ratio = float(hintRatio * .01)
|
||||||
timeElapsed = float(time.time() - self.askedAt)
|
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)
|
charMask = self.registryValue('charMask', self.channel)
|
||||||
if len(self.answers) > 1 or len(self.answers) < 1:
|
if len(self.answers) > 1 or len(self.answers) < 1:
|
||||||
return
|
return
|
||||||
@ -922,11 +921,12 @@ class TriviaTime(callbacks.Plugin):
|
|||||||
return hints
|
return hints
|
||||||
|
|
||||||
def getOtherHint(self, username):
|
def getOtherHint(self, username):
|
||||||
if username in self.shownOtherHint:
|
if self.questionOver:
|
||||||
return
|
return
|
||||||
self.shownOtherHint[username] = True
|
if self.shownHint == False:
|
||||||
if len(self.answers) == 1:
|
self.shownHint = True
|
||||||
self.sendMessage(self.getOtherHintString())
|
if len(self.answers) == 1:
|
||||||
|
self.sendMessage(self.getOtherHintString())
|
||||||
|
|
||||||
def getRemainingKAOS(self):
|
def getRemainingKAOS(self):
|
||||||
if len(self.answers) > 1:
|
if len(self.answers) > 1:
|
||||||
@ -944,7 +944,6 @@ class TriviaTime(callbacks.Plugin):
|
|||||||
self.sendMessage('Hint %s: %s' % (self.hintsCounter, hints), 1, 9)
|
self.sendMessage('Hint %s: %s' % (self.hintsCounter, hints), 1, 9)
|
||||||
#reset hint shown
|
#reset hint shown
|
||||||
self.shownHint = False
|
self.shownHint = False
|
||||||
self.shownOtherHint = {}
|
|
||||||
|
|
||||||
timeout = 2
|
timeout = 2
|
||||||
if len(self.answers) > 1:
|
if len(self.answers) > 1:
|
||||||
@ -971,7 +970,6 @@ class TriviaTime(callbacks.Plugin):
|
|||||||
self.questionOver = False
|
self.questionOver = False
|
||||||
self.shownHint = False
|
self.shownHint = False
|
||||||
self.skipVoteCount = {}
|
self.skipVoteCount = {}
|
||||||
self.shownOtherHint = {}
|
|
||||||
self.question = ''
|
self.question = ''
|
||||||
self.answers = []
|
self.answers = []
|
||||||
self.alternativeAnswers = []
|
self.alternativeAnswers = []
|
||||||
|
Loading…
x
Reference in New Issue
Block a user