diff --git a/Module.py b/Module.py index 293e31b..0f801f8 100644 --- a/Module.py +++ b/Module.py @@ -226,6 +226,16 @@ class Module(object): else: return attempt + def remove_metaoptions(self, list): + """Remove metaoptions from provided list, which was probably from a config file.""" + + list.remove('debug') + # if this option has been provided, don't print it + try: + self.config.get(self.__class__.__name__, 'meta.pubmsg_needs_bot_prefix') + cdlist.remove('meta.pubmsg_needs_bot_prefix') + except NoOptionError: pass + def do(self, connection, event, nick, userhost, replypath, what, admin_unlocked): """ Do the primary thing this module was intended to do. diff --git a/modules/Countdown.py b/modules/Countdown.py index 2cec631..d4747cb 100644 --- a/modules/Countdown.py +++ b/modules/Countdown.py @@ -49,12 +49,7 @@ class Countdown(Module): elif whats[1] == 'list': try: cdlist = self.config.options(self.__class__.__name__) - cdlist.remove('debug') - # if this option has been provided, don't print it - try: - self.config.get(self.__class__.__name__, 'meta.pubmsg_needs_bot_prefix') - cdlist.remove('meta.pubmsg_needs_bot_prefix') - except NoOptionError: pass + self.remove_metaoptions(cdlist) cdlist.sort() liststr = ', '.join(cdlist) return self.reply(connection, replypath, liststr)