diff options
author | Matt Robinson <brimstone@the.narro.ws> | 2016-06-17 11:31:17 -0400 |
---|---|---|
committer | Matt Robinson <brimstone@the.narro.ws> | 2016-06-17 11:31:17 -0400 |
commit | f1bc04f928b7eb16495b11572dc094e4e7dbd379 (patch) | |
tree | 27c1a7bf4625c3c535f4c4bf19a712ac7aeb430f /wee_slack.py | |
parent | 7fb51febd5cd1aebc7979bdeccb72f1832484536 (diff) | |
download | wee-slack-f1bc04f928b7eb16495b11572dc094e4e7dbd379.tar.gz |
Switched around logic for readability
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 10 |
1 files changed, 5 insertions, 5 deletions
diff --git a/wee_slack.py b/wee_slack.py index dab61b0..9a15b9a 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -1067,16 +1067,16 @@ def command_talk(current_buffer, args): server = servers.find(current_domain_name()) if server: channel = server.channels.find(args) - if channel is not None: - channel.open() - if w.config_get_plugin('switch_buffer_on_join') != '0': - w.buffer_set(channel.channel_buffer, "display", "1") - else: + if channel is None: user = server.users.find(args) if user: user.create_dm_channel() else: server.buffer_prnt("User or channel {} not found.".format(args)) + else: + channel.open() + if w.config_get_plugin('switch_buffer_on_join') != '0': + w.buffer_set(channel.channel_buffer, "display", "1") return True else: return False |