mirror of
https://github.com/jlu5/SupyPlugins.git
synced 2025-04-27 05:21:10 -05:00
FML: add an option to hide verbose info (ID, categories, link)
This commit is contained in:
parent
ca3b9323e7
commit
b010141dd5
@ -49,9 +49,8 @@ def configure(advanced):
|
|||||||
|
|
||||||
|
|
||||||
FML = conf.registerPlugin('FML')
|
FML = conf.registerPlugin('FML')
|
||||||
# This is where your configuration variables (if any) should go. For example:
|
conf.registerChannelValue(FML, 'showInfo',
|
||||||
# conf.registerGlobalValue(FML, 'someConfigVariableName',
|
registry.Boolean(True, _("""Weather we should show more info (ID, category, and URL) in FML posts.""")))
|
||||||
# registry.Boolean(False, _("""Help for someConfigVariableName.""")))
|
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
# vim:set shiftwidth=4 tabstop=4 expandtab textwidth=79:
|
||||||
|
@ -80,8 +80,12 @@ class FML(callbacks.Plugin):
|
|||||||
votes = ircutils.bold("[Agreed: %s / Deserved: %s]" %
|
votes = ircutils.bold("[Agreed: %s / Deserved: %s]" %
|
||||||
(tree.find('agree').text,
|
(tree.find('agree').text,
|
||||||
tree.find('deserved').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)
|
irc.reply(s)
|
||||||
fml = wrap(fml, [additional('positiveInt')])
|
fml = wrap(fml, [additional('positiveInt')])
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user