Style updates.

This commit is contained in:
Jeremy Fincher 2003-11-13 19:21:22 +00:00
parent 9b20e1dfb6
commit 563e5ad2bf

View File

@ -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)