diff --git a/src/db.py b/src/db.py index 00cd688..3268a34 100644 --- a/src/db.py +++ b/src/db.py @@ -412,7 +412,10 @@ def get_game_stats(mode, size): bits = [] for row in c: - bits.append("{0} wins: {1} ({2}%)".format(singular(row[0]).title(), row[1], round(row[1]/total_games * 100))) + winner = singular(row[0]).title() + if not winner: + winner = botconfig.NICK.title() + bits.append("{0} wins: {1} ({2}%)".format(winner, row[1], round(row[1]/total_games * 100))) bits.append("Total games: {0}".format(total_games)) return msg + ", ".join(bits) diff --git a/src/utilities.py b/src/utilities.py index 6c7789a..3329c2c 100644 --- a/src/utilities.py +++ b/src/utilities.py @@ -288,9 +288,11 @@ def singular(plural): # fool is present since we store fool wins as 'fool' rather than # 'fools' as only a single fool wins, however we don't want to # chop off the l and have it report 'foo wins' + # same thing with 'everyone' conv = {"wolves": "wolf", "succubi": "succubus", - "fool": "fool"} + "fool": "fool", + "everyone": "everyone"} if plural in conv: return conv[plural] # otherwise we just added an s on the end