Converted ShrinkUrl to use format.

This commit is contained in:
Jeremy Fincher 2005-02-01 09:41:39 +00:00
parent 74717061f2
commit 18f8044621

View File

@ -120,8 +120,7 @@ class ShrinkUrl(callbacks.PrivmsgCommandAndRegexp):
url = match.group(0)
r = self.registryValue('nonSnarfingRegexp', channel)
if r and r.search(url) is not None:
self.log.debug('Matched nonSnarfingRegexp: %s',
utils.quoted(url))
self.log.debug('Matched nonSnarfingRegexp: %u', url)
return
minlen = self.registryValue('minimumLength', channel)
cmd = self.registryValue('default', channel)
@ -132,11 +131,10 @@ class ShrinkUrl(callbacks.PrivmsgCommandAndRegexp):
elif cmd == 'ln':
(shorturl, _) = self._getLnUrl(url)
if shorturl is None:
self.log.info('Couldn\'t get shorturl for %s',
utils.quoted(url))
self.log.info('Couldn\'t get shorturl for %u', url)
return
domain = utils.web.getDomain(url)
s = '%s (at %s)' % (ircutils.bold(shorturl), domain)
s = format('%u (at %s)', ircutils.bold(shorturl), domain)
m = irc.reply(s, prefixName=False)
m.tag('shrunken')
shrinkSnarfer = urlSnarfer(shrinkSnarfer)