Improve using correct nickname capitalisation in words.py
This commit is contained in:
parent
7698105761
commit
c2c60e309a
1 changed files with 3 additions and 4 deletions
|
@ -71,10 +71,9 @@ class Module(object):
|
|||
|
||||
top_10 = sorted(word_users.keys())
|
||||
top_10 = sorted(top_10, key=word_users.get, reverse=True)[: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)
|
||||
top_10 = ", ".join("%s (%d)" % (event["server"].get_user(
|
||||
nickname).nickname, word_users[nickname]
|
||||
) 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")
|
||||
|
|
Loading…
Reference in a new issue