diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2017-10-25 23:33:43 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2017-10-25 23:33:43 +0200 |
commit | a7df9a1c7e4699e1ace40454d3f951699bdf6753 (patch) | |
tree | 09b5818b9297b5176090dd462880144a239964d6 | |
parent | 37b3c1c670aee7b160eb74cb6b80e53c6a10ff2d (diff) | |
parent | b61e5c0d28332bacb477ca666ba212204e445398 (diff) | |
download | wee-slack-a7df9a1c7e4699e1ace40454d3f951699bdf6753.tar.gz |
Merge pull request #449 from dzfweb/master
-rw-r--r-- | wee_slack.py | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 50b0655..831a9f2 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -2953,6 +2953,30 @@ def msg_command_cb(data, current_buffer, args): return w.WEECHAT_RC_OK_EAT +@slack_buffer_required +@utf8_decode +def command_channels(data, current_buffer, args): + e = EVENTROUTER + team = e.weechat_controller.buffers[current_buffer].team + + team.buffer_prnt("Channels:") + for channel in team.get_channel_map(): + team.buffer_prnt(" {}".format(channel)) + return w.WEECHAT_RC_OK_EAT + + +@slack_buffer_required +@utf8_decode +def command_users(data, current_buffer, args): + e = EVENTROUTER + team = e.weechat_controller.buffers[current_buffer].team + + team.buffer_prnt("Users:") + for user in team.users.values(): + team.buffer_prnt(" {:<25}({})".format(user.name, user.presence)) + return w.WEECHAT_RC_OK_EAT + + @slack_buffer_or_ignore @utf8_decode def command_talk(data, current_buffer, args): |