diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-14 19:11:51 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2019-06-14 19:18:22 +0200 |
commit | bf931150a2050688b4213d803eba5bffbd951a39 (patch) | |
tree | fe72e6e15083731a3954d256e98dc006151cde3c /wee_slack.py | |
parent | 41dcc9e6a866fd18f26c5ee3f272349569523572 (diff) | |
download | wee-slack-bf931150a2050688b4213d803eba5bffbd951a39.tar.gz |
Ignore away command run on non-slack buffers without -all
This prevents printing an error when running /away without -all on
buffers other than slack buffers.
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 4d95fa8..8110ee7 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -4154,8 +4154,10 @@ def away_command_cb(data, current_buffer, args): all_servers, message = re.match('^/away( -all)? ?(.*)', args).groups() if all_servers: team_buffers = [team.channel_buffer for team in EVENTROUTER.teams.values()] - else: + elif current_buffer in EVENTROUTER.weechat_controller.buffers: team_buffers = [current_buffer] + else: + return w.WEECHAT_RC_OK for team_buffer in team_buffers: if message: |