mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-12-23 11:12:47 +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',
|
||||
ShrinkService('ln', """Determines what website the bot will use when
|
||||
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
|
||||
|
@ -133,7 +133,10 @@ class ShrinkUrl(callbacks.PluginRegexp):
|
||||
self.log.info('Couldn\'t get shorturl for %u', url)
|
||||
return
|
||||
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.tag('shrunken')
|
||||
shrinkSnarfer = urlSnarfer(shrinkSnarfer)
|
||||
|
Loading…
Reference in New Issue
Block a user