diff --git a/FML/config.py b/FML/config.py index 4f3249f..f1e1b83 100644 --- a/FML/config.py +++ b/FML/config.py @@ -49,9 +49,8 @@ def configure(advanced): FML = conf.registerPlugin('FML') -# This is where your configuration variables (if any) should go. For example: -# conf.registerGlobalValue(FML, 'someConfigVariableName', -# registry.Boolean(False, _("""Help for someConfigVariableName."""))) +conf.registerChannelValue(FML, 'showInfo', + registry.Boolean(True, _("""Weather we should show more info (ID, category, and URL) in FML posts."""))) # vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79: diff --git a/FML/plugin.py b/FML/plugin.py index bdf5138..545fd4a 100644 --- a/FML/plugin.py +++ b/FML/plugin.py @@ -80,8 +80,12 @@ class FML(callbacks.Plugin): votes = ircutils.bold("[Agreed: %s / Deserved: %s]" % (tree.find('agree').text, tree.find('deserved').text)) - s = format('\x02#%i [%s]\x02: %s - %s %u', fmlid, - category, text, votes, url) + + if not self.registryValue("showInfo", msg.args[0]): + s = format('%s - %s', text, votes) + else: + s = format('\x02#%i [%s]\x02: %s - %s %u', fmlid, + category, text, votes, url) irc.reply(s) fml = wrap(fml, [additional('positiveInt')])