Change some info logs to debug and make sure we don't reply from a snarfer

unless it's with the snarfed info.  Anything else should be logged.
This commit is contained in:
James Vega 2005-01-04 18:44:33 +00:00
parent 9077b1da6e
commit 20bcb697a1

View File

@ -177,13 +177,13 @@ class Gameknot(callbacks.PrivmsgCommandAndRegexp):
return return
m = self._gkGameTitle.search(s) m = self._gkGameTitle.search(s)
if m is None: if m is None:
self.log.info('_gkGameTitle didn\'t match (%s).', url) self.log.debug('_gkGameTitle didn\'t match (%s).', url)
return return
gameTitle = m.groups() gameTitle = m.groups()
gameTitle = ircutils.bold(gameTitle) gameTitle = ircutils.bold(gameTitle)
L = self._gkPlayer.findall(s) L = self._gkPlayer.findall(s)
if not L: if not L:
self.log.info('_gkPlayer didn\'t match (%s).', url) self.log.debug('_gkPlayer didn\'t match (%s).', url)
return return
((wRating, wName), (bRating, bName)) = L ((wRating, wName), (bRating, bName)) = L
wName = ircutils.bold(wName) wName = ircutils.bold(wName)
@ -219,10 +219,10 @@ class Gameknot(callbacks.PrivmsgCommandAndRegexp):
(gameTitle, wName, wStats, bName, bStats, toMove) (gameTitle, wName, wStats, bName, bStats, toMove)
irc.reply(s, prefixName=False) irc.reply(s, prefixName=False)
except ValueError: except ValueError:
s = 'That doesn\'t appear to be a proper Gameknot game.' s = '%s doesn\'t appear to be a proper Gameknot game.' % url
irc.errorPossibleBug(s) self.log.debug('Unable to snarf. %s' % s)
except Exception, e: except Exception, e:
irc.error(utils.exnToString(e)) self.log.warning(utils.exnToString(e))
gameknotSnarfer = urlSnarfer(gameknotSnarfer) gameknotSnarfer = urlSnarfer(gameknotSnarfer)
def gameknotStatsSnarfer(self, irc, msg, match): def gameknotStatsSnarfer(self, irc, msg, match):