From 76981057617c46dd4d4f85df8d461c608ede65a6 Mon Sep 17 00:00:00 2001 From: jesopo Date: Sun, 5 Aug 2018 13:12:07 +0100 Subject: [PATCH] When a user is online, use correct capitalisation in !wordusers --- modules/words.py | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/modules/words.py b/modules/words.py index 3a73f398..9717f62e 100644 --- a/modules/words.py +++ b/modules/words.py @@ -71,8 +71,10 @@ class Module(object): top_10 = sorted(word_users.keys()) top_10 = sorted(top_10, key=word_users.get, reverse=True)[:10] - top_10 = ", ".join("%s (%d)" % (nickname, word_users[nickname - ]) for nickname in top_10) + top_10 = [event["server"].get_user(nickname + ).nickname for nickname in top_10] + top_10 = ", ".join("%s (%d)" % (nickname, word_users[ + nickname.lower()]) for nickname in top_10) event["stdout"].write("Top '%s' users: %s" % (word, top_10)) else: event["stderr"].write("That word is not being tracked")