diff --git a/Jeopardy/config.py b/Jeopardy/config.py index 01e06a4..a393da2 100644 --- a/Jeopardy/config.py +++ b/Jeopardy/config.py @@ -137,10 +137,16 @@ conf.registerChannelValue(Jeopardy.template, 'question', registry.String("#{{number}} of {{total}}: \x0313({{airdate}}) \x0309[${{points}}] \x0310\x1f{{category}}\x1f: {{clue}}", _("""The template used to render questions."""))) -conf.registerChannelValue(Jeopardy.template, 'restart', +conf.registerGroup(Jeopardy.template, 'restart') + +conf.registerChannelValue(Jeopardy.template.restart, 'question', registry.String("\x0313({{airdate}}) \x0309[${{points}}] \x0310\x1f{{category}}\x1f: {{clue}}", _("""The template used to render questions when autoRestart is True."""))) +conf.registerChannelValue(Jeopardy.template.restart, 'correct', + registry.String("\x0313{{nick}}\x03 got it! The full answer was: {{answer}}. Points: \x0309{{points}}\x03 | Total: \x0309{{total}}", + _("""The template used to render correct answer replies when autoRestart is True."""))) + conf.registerChannelValue(Jeopardy.template, 'hint', registry.String("HINT: {{hint}}{% if time %} | ({{time}} seconds remaining){% endif %}", _("""The template used to render hints."""))) diff --git a/Jeopardy/plugin.py b/Jeopardy/plugin.py index 5b10f39..5cd27c5 100644 --- a/Jeopardy/plugin.py +++ b/Jeopardy/plugin.py @@ -86,7 +86,10 @@ class Jeopardy(callbacks.Plugin): self.categories = categories self.channel = channel self.correct = True - self.correct_template = Template(self.registryValue("template.correct", channel)) + if restart: + self.correct_template = Template(self.registryValue("template.restart.correct", channel)) + else: + self.correct_template = Template(self.registryValue("template.correct", channel)) self.currentHint = '' self.delay = self.registryValue('delay', channel) self.directory = conf.supybot.directories.data.dirize("jeopardy/") @@ -104,7 +107,7 @@ class Jeopardy(callbacks.Plugin): self.points = self.registryValue('defaultPointValue') self.question = '' if restart: - self.question_template = Template(self.registryValue("template.restart", channel)) + self.question_template = Template(self.registryValue("template.restart.question", channel)) else: self.question_template = Template(self.registryValue("template.question", channel)) self.questions = []