mirror of
https://github.com/Mikaela/Limnoria.git
synced 2024-11-23 19:19:32 +01:00
Style updates.
This commit is contained in:
parent
9b20e1dfb6
commit
563e5ad2bf
@ -131,12 +131,13 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
|
||||
if not self.configurables.get('snarfer', channel=msg.args[0]):
|
||||
return
|
||||
url = match.group(0)
|
||||
#debug.printf(url)
|
||||
debug.printf(url)
|
||||
self._getResponse(irc, msg, url, snarf=True)
|
||||
ebaySnarfer = privmsgs.urlSnarfer(ebaySnarfer)
|
||||
|
||||
_bold = lambda self, m: (ircutils.bold(m[0]),) + m[1:]
|
||||
def _getResponse(self, irc, msg, url, snarf=False):
|
||||
def bold(m):
|
||||
return (ircutils.bold(m[0]),) + m[1:]
|
||||
fd = urllib2.urlopen(url)
|
||||
s = fd.read()
|
||||
fd.close()
|
||||
@ -161,9 +162,9 @@ class Ebay(callbacks.PrivmsgCommandAndRegexp, plugins.Configurable):
|
||||
# [:3] is to make sure that we don't pass a tuple with
|
||||
# more than 3 items. this allows self._bidder to work
|
||||
# since self._bidder returns a 5 item tuple
|
||||
resp.append('%s: %s (%s)' % self._bold(m.groups()[:3]))
|
||||
resp.append('%s: %s (%s)' % bold(m.groups()[:3]))
|
||||
else:
|
||||
resp.append('%s: %s' % self._bold(m.groups()))
|
||||
resp.append('%s: %s' % bold(m.groups()))
|
||||
if resp:
|
||||
if snarf:
|
||||
irc.reply(msg, '%s' % '; '.join(resp), prefixName=False)
|
||||
|
Loading…
Reference in New Issue
Block a user