Commit bbcd5b22 authored by Jonathan Harker's avatar Jonathan Harker

Basic hint support, for questions that have them.

parent bf2da99c
......@@ -211,10 +211,18 @@ class LolBot(SingleServerIRCBot):
def quiz_get_next(self):
self.quiz += 1
self.tip = 0
self.question = random.choice(self.qb)
self.connection.notice(, "Question %s: %s" % (self.quiz, str(self.question.question)))
def quiz_tip(self):
if len(self.question.tip) > self.tip:
self.connection.notice(, "Tip: %s" % self.question.tip[self.tip])
self.tip += 1
self.connection.notice(, "No more tips.")
def quiz_award_points(self, nick):
if nick not in self.quiz_scores.keys():
self.quiz_scores[nick] = 0
......@@ -300,6 +308,10 @@ class LolBot(SingleServerIRCBot):
if self.quiz:
elif cmd == 'tip' or cmd == 'hint':
if self.quiz:
elif cmd == 'ask':
if self.quiz:
c.notice(, "Quiz is running. Use halt or quit to stop.")
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment