Fixed plurality problem in gkstats.

This commit is contained in:
Jeremy Fincher 2003-07-02 18:58:45 +00:00
parent 440a336010
commit df02bd593e

View File

@ -217,13 +217,17 @@ class Http(callbacks.Privmsg):
else: else:
seen = '%s was last seen on Gameknot %s.' % (name, seen = '%s was last seen on Gameknot %s.' % (name,
seen.group(2)) seen.group(2))
if games == 1:
games = '1 active game'
else:
games = '%s active games' % games
if profile.find('Team:') >= 0: if profile.find('Team:') >= 0:
team = self._gkteam.search(profile).group('name') team = self._gkteam.search(profile).group('name')
irc.reply(msg, '%s (team: %s) is rated %s and has %s active ' \ irc.reply(msg, '%s (team: %s) is rated %s and has %s ' \
'games and a record of W-%s, L-%s, D-%s. %s' % \ 'and a record of W-%s, L-%s, D-%s. %s' % \
(name, team, rating, games, w, l, d, seen)) (name, team, rating, games, w, l, d, seen))
else: else:
irc.reply(msg, '%s is rated %s and has %s active games ' \ irc.reply(msg, '%s is rated %s and has %s ' \
'and a record of W-%s, L-%s, D-%s. %s' % \ 'and a record of W-%s, L-%s, D-%s. %s' % \
(name, rating, games, w, l, d, seen)) (name, rating, games, w, l, d, seen))
except AttributeError: except AttributeError: