]> jfr.im git - irc/rizon/acid.git/blobdiff - pyva/pyva/src/main/python/trivia/trivia_engine.py
Allow channel half operators or higher to skip a trivia question
[irc/rizon/acid.git] / pyva / pyva / src / main / python / trivia / trivia_engine.py
index 26827e8be981a0f1a4891122129f3452a5bdc7d8..29e664b91b6821c2ef8f45e7c5beb1e443906497 100644 (file)
@@ -266,3 +266,17 @@ class Trivia(object):
                self.module.msg(self.cname,
                                msg + " '.trivia [number]' to start playing again.")
 
+       def skip(self):
+               '''Stops the current question and asks the next question'''
+               try:
+                       self.question_timer.stop()
+                       self.hint_timer.stop()
+               except AttributeError:
+                       return
+
+               self.answer = []
+               self.hints_given = 0
+               self.hint_timer = task.LoopingCall(self.ask)
+               self.hint_timer.start(5, False)
+
+               self.module.msg(self.cname, "Skipping question")