Stop using prevent_highlight. it ruins terminals on OS X
This commit is contained in:
parent
dc17ef7bb9
commit
f715e46155
3 changed files with 8 additions and 10 deletions
|
@ -158,8 +158,8 @@ class Module(ModuleManager.BaseModule):
|
|||
:help: Show the top 10 richest users
|
||||
"""
|
||||
top_10 = utils.top_10(self._all_coins(event["server"]),
|
||||
convert_key=lambda nickname: utils.prevent_highlight(
|
||||
event["server"].get_user(nickname).nickname),
|
||||
convert_key=lambda nickname:
|
||||
event["server"].get_user(nickname).nickname,
|
||||
value_format=lambda value: self._coin_str_human(value))
|
||||
event["stdout"].write("Richest users: %s" % ", ".join(top_10))
|
||||
|
||||
|
|
|
@ -114,10 +114,8 @@ class Module(ModuleManager.BaseModule):
|
|||
user_stats[nickname] = 0
|
||||
user_stats[nickname] += value
|
||||
|
||||
nick_func = lambda nickname: utils.prevent_highlight(
|
||||
server.get_user(nickname).nickname)
|
||||
|
||||
top_10 = utils.top_10(user_stats, convert_key=nick_func)
|
||||
top_10 = utils.top_10(user_stats,
|
||||
convert_key=lambda nickname: server.get_user(nickname).nickname)
|
||||
return "Top duck %s%s: %s" % (description, channel_query_str,
|
||||
", ".join(top_10))
|
||||
|
||||
|
|
|
@ -102,8 +102,8 @@ class Module(ModuleManager.BaseModule):
|
|||
items = [(word_user[0], word_user[1]) for word_user in word_users]
|
||||
word_users = dict(items)
|
||||
top_10 = utils.top_10(word_users,
|
||||
convert_key=lambda nickname: utils.prevent_highlight(
|
||||
event["server"].get_user(nickname).nickname))
|
||||
convert_key=lambda nickname:
|
||||
event["server"].get_user(nickname).nickname)
|
||||
event["stdout"].write("Top '%s' users: %s" % (word,
|
||||
", ".join(top_10)))
|
||||
else:
|
||||
|
@ -130,7 +130,7 @@ class Module(ModuleManager.BaseModule):
|
|||
user_words[nickname] += word_count
|
||||
|
||||
top_10 = utils.top_10(user_words,
|
||||
convert_key=lambda nickname: utils.prevent_highlight(
|
||||
event["server"].get_user(nickname).nickname))
|
||||
convert_key=lambda nickname:
|
||||
event["server"].get_user(nickname).nickname)
|
||||
event["stdout"].write("wordiest%s: %s" % (
|
||||
word_prefix, ", ".join(top_10)))
|
||||
|
|
Loading…
Reference in a new issue