mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 11:09:23 +01:00
Converted ShrinkUrl to use format.
This commit is contained in:
parent
74717061f2
commit
18f8044621
@ -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)
|
||||
|
Loading…
Reference in New Issue
Block a user