From 78687027b04eedb19ac4dc4bbc83887c1b7381dc Mon Sep 17 00:00:00 2001 From: James Vega Date: Tue, 15 Apr 2003 01:43:23 +0000 Subject: [PATCH] Fixed gkstats so that it doesn't display duplicate text with gkseen --- plugins/Http.py | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/plugins/Http.py b/plugins/Http.py index 9b5071d7d..d2fedcf0c 100644 --- a/plugins/Http.py +++ b/plugins/Http.py @@ -165,13 +165,14 @@ class Http(callbacks.Privmsg): rating = self._gkrating.search(profile).group(1) games = self._gkgames.search(profile).group(1) (w, l, d) = self._gkrecord.search(profile).groups() - seen = self._gkseen.search(utils.htmlToText(profile)).group(1) - if seen.find("is hiding") != -1: + seen = self._gkseen.search(utils.htmlToText(profile)) + if seen.group(0).find("is hiding") != -1: seen = '%s is hiding his/her online status.' % name - elif seen.startswith('0'): + elif seen.group(2).startswith('0'): seen = '%s is on gameknot right now.' % name else: - seen = '%s was last seen on Gameknot %s.' % (name, seen) + seen = '%s was last seen on Gameknot %s.' % (name, + seen.group(2)) if profile.find('Team:') >= 0: team = self._gkteam.search(profile).group('name') irc.reply(msg, '%s (team: %s) is rated %s and has %s active ' \