]> jfr.im git - erebus.git/commitdiff
trivia bugfix
authorzonidjan <redacted>
Thu, 11 Feb 2016 17:05:13 +0000 (11:05 -0600)
committerzonidjan <redacted>
Thu, 11 Feb 2016 17:05:13 +0000 (11:05 -0600)
modules/trivia.py

index afe439024e27888820c285dd4f461176e1738847..b23248c82020b51240d48aa8cb5629134024ae4c 100644 (file)
@@ -219,7 +219,8 @@ class TriviaState(object):
 
                if self.missedquestions > self.db['maxmissedquestions']:
                        stop()
-                       self.getbot().msg(self.getchan(), "%d questions unanswered! Stopping the game.")
+                       self.getbot().msg(self.getchan(), "%d questions unanswered! Stopping the game." % (self.missedquestions))
+                       return
 
                if skipwait:
                        self._nextquestion(iteration)
@@ -412,8 +413,9 @@ def cmd_stop(bot, user, chan, realtarget, *args):
 
 def stop():
        try:
-               if state.curq is not None:
+               if state.curq is not None or state.nextq is not None:
                        state.curq = None
+                       state.nextq = None
                        try:
                                state.steptimer.cancel()
                        except Exception as e: