diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2018-06-08 13:37:31 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2018-09-04 20:48:27 +0200 |
commit | aa3490cf3682b872de7d2dfa988e12064a75ab1e (patch) | |
tree | 3eb92d129834bf4d98e49c6c61870e6f2d86c9d5 /wee_slack.py | |
parent | f51744fc56de0227137fd00d75b7df27291b3664 (diff) | |
download | wee-slack-aa3490cf3682b872de7d2dfa988e12064a75ab1e.tar.gz |
Implement showmuted command properly
Show channel names instead of id's, and show them in a more readable
format.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/wee_slack.py b/wee_slack.py index 2a0a7b5..605456c 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -3426,8 +3426,11 @@ def command_talk(data, current_buffer, args): def command_showmuted(data, current_buffer, args): - current = w.current_buffer() - w.prnt(EVENTROUTER.weechat_controller.buffers[current].team.channel_buffer, str(EVENTROUTER.weechat_controller.buffers[current].team.muted_channels)) + team = EVENTROUTER.weechat_controller.buffers[current_buffer].team + muted_channels = [team.channels[key].name + for key in team.muted_channels if key in team.channels] + team.buffer_prnt("Muted channels: {}".format(', '.join(muted_channels))) + return w.WEECHAT_RC_OK_EAT @utf8_decode |