From abbe99fd8cfaa6521de1f115ed56d22b46e55010 Mon Sep 17 00:00:00 2001 From: Jeremy Fincher Date: Thu, 6 Nov 2003 21:33:50 +0000 Subject: [PATCH] Fixed bug in seen regexp that would catch the old GK rating, too. --- plugins/Gameknot.py | 2 +- test/test_Gameknot.py | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/plugins/Gameknot.py b/plugins/Gameknot.py index 3226d110a..9c49fa3c4 100644 --- a/plugins/Gameknot.py +++ b/plugins/Gameknot.py @@ -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.*?)') - _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: diff --git a/test/test_Gameknot.py b/test/test_Gameknot.py index c63b7569b..58fb2b8ef 100644 --- a/test/test_Gameknot.py +++ b/test/test_Gameknot.py @@ -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')