From 4fb7bcca39bcb9819861d7133ecdc84a23424195 Mon Sep 17 00:00:00 2001 From: Christopher Glass Date: Tue, 29 Nov 2011 13:38:17 +0000 Subject: [PATCH] Added a listfaq comand to the faq plugin For the time being it simply makes the bot spit out a list of available faq entries. --- core/plugins/faq.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/core/plugins/faq.py b/core/plugins/faq.py index 6592d05..205bdbb 100644 --- a/core/plugins/faq.py +++ b/core/plugins/faq.py @@ -35,6 +35,10 @@ def command_addfaq(self, rest, user, channel): self.faqs[identifier] = answer self.write() channel.msg('Added FAQ entry for %r' % identifier) + + def command_listfaq(self, rest, user, channel): + for faq in self.faqs.keys(): + channel.msg('%s' % faq) def command_faq(self, rest, user, channel): answer = self.faqs.get(rest, None)