From 606e92a47f0335527e376f283c4909fb3bff1bac Mon Sep 17 00:00:00 2001 From: James Vega Date: Wed, 9 Mar 2005 23:29:49 +0000 Subject: [PATCH] Add supybot.plugins.ShrinkUrl.bold --- plugins/ShrinkUrl/config.py | 3 +++ plugins/ShrinkUrl/plugin.py | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/plugins/ShrinkUrl/config.py b/plugins/ShrinkUrl/config.py index 2e4a833f2..e94f77922 100644 --- a/plugins/ShrinkUrl/config.py +++ b/plugins/ShrinkUrl/config.py @@ -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 diff --git a/plugins/ShrinkUrl/plugin.py b/plugins/ShrinkUrl/plugin.py index 3e73d263c..3f0c2c97f 100644 --- a/plugins/ShrinkUrl/plugin.py +++ b/plugins/ShrinkUrl/plugin.py @@ -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)