When a user is online, use correct capitalisation in !wordusers

This commit is contained in:
jesopo 2018-08-05 13:12:07 +01:00
parent 1af821123b
commit 7698105761

View file

@ -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")