]> jfr.im git - irc/rizon/acid.git/commitdiff
topten command is no longer silent if there are no scores for the channel
authorMichiel <redacted>
Wed, 24 Dec 2014 22:07:38 +0000 (23:07 +0100)
committerMichiel <redacted>
Wed, 24 Dec 2014 22:07:38 +0000 (23:07 +0100)
pyva/pyva/src/main/python/trivia/trivia.py

index 3f698372d150d81f6d4ed29cba7370b457bf371e..17b0ad617db38fd6a8ebcc6be4fbc4c21c28cf6f 100644 (file)
@@ -260,8 +260,11 @@ class trivia(
                                        for i, row in enumerate(self.dbp.fetchall()):
                                                # i+1 = 1 should equal out[0]
                                                out.append("%d. %s %d" % (i+1, row[0], row[1]))
-
-                                       self.notice(sender, '; '.join(out))
+                                               
+                                       if len(out) == 0:                                               
+                                               self.notice(sender, "No one has played yet.")
+                                       else:
+                                               self.notice(sender, '; '.join(out))
                                elif command == 'rank':
                                        if arg != '':
                                                querynick = arg.lower()