Fixed bug in seen regexp that would catch the old GK rating, too.

This commit is contained in:
Jeremy Fincher 2003-11-06 21:33:50 +00:00
parent 3f1296a858
commit abbe99fd8c
2 changed files with 2 additions and 2 deletions

View File

@ -82,7 +82,7 @@ class Gameknot(callbacks.PrivmsgCommandAndRegexp, plugins.Toggleable):
_gkrecord = re.compile(r'"#FFFF00">(\d+)[^"]+"#FFFF00">(\d+)[^"]+'\
'"#FFFF00">(\d+)')
_gkteam = re.compile(r'Team:(<.*?>)+(?P<name>.*?)</span>')
_gkseen = re.compile(r'(seen on GK:\s+([^[]+)\s+|.*?is hiding.*?)')
_gkseen = re.compile(r'(seen on GK:\s+([^[]+ago)|.*?is hiding.*?)')
def getStats(self, name):
gkprofile = 'http://www.gameknot.com/stats.pl?%s' % name
try:

View File

@ -36,7 +36,7 @@ import utils
class GameknotTestCase(PluginTestCase, PluginDocumentation):
plugins = ('Gameknot',)
def testGkstats(self):
self.assertNotError('gkstats jemfinch')
self.assertNotRegexp('gkstats jemfinch', 'Old GK rating')
self.assertError('gkstats %s' % utils.mktemp())
self.assertNotError('gkstats Strike')