mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 19:22:45 +01:00
Add supybot.plugins.ShrinkUrl.bold
This commit is contained in:
parent
e3d4478d82
commit
606e92a47f
@ -63,6 +63,9 @@ conf.registerChannelValue(ShrinkUrl, 'outFilter',
|
|||||||
conf.registerChannelValue(ShrinkUrl, 'default',
|
conf.registerChannelValue(ShrinkUrl, 'default',
|
||||||
ShrinkService('ln', """Determines what website the bot will use when
|
ShrinkService('ln', """Determines what website the bot will use when
|
||||||
shrinking a URL."""))
|
shrinking a URL."""))
|
||||||
|
conf.registerGlobalValue(ShrinkUrl, 'bold',
|
||||||
|
registry.Boolean(True, """Determines whether this plugin will bold certain
|
||||||
|
portions of its replies."""))
|
||||||
|
|
||||||
|
|
||||||
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78
|
# vim:set shiftwidth=4 tabstop=8 expandtab textwidth=78
|
||||||
|
@ -133,7 +133,10 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
|||||||
self.log.info('Couldn\'t get shorturl for %u', url)
|
self.log.info('Couldn\'t get shorturl for %u', url)
|
||||||
return
|
return
|
||||||
domain = utils.web.getDomain(url)
|
domain = utils.web.getDomain(url)
|
||||||
s = format('%u (at %s)', ircutils.bold(shorturl), domain)
|
if self.registryValue('bold'):
|
||||||
|
s = format('%u (at %s)', ircutils.bold(shorturl), domain)
|
||||||
|
else:
|
||||||
|
s = format('%u (at %s)', shorturl, domain)
|
||||||
m = irc.reply(s, prefixName=False)
|
m = irc.reply(s, prefixName=False)
|
||||||
m.tag('shrunken')
|
m.tag('shrunken')
|
||||||
shrinkSnarfer = urlSnarfer(shrinkSnarfer)
|
shrinkSnarfer = urlSnarfer(shrinkSnarfer)
|
||||||
|
Loading…
Reference in New Issue
Block a user