aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMatt Robinson <brimstone@the.narro.ws>2016-06-13 11:54:17 -0400
committerMatt Robinson <brimstone@the.narro.ws>2016-06-13 11:54:17 -0400
commit7fb51febd5cd1aebc7979bdeccb72f1832484536 (patch)
treecb3520b0cc4c307bb9b184d1b48e72ce7a032235
parentbcf5bfbc7a7ea12d301390fb7999efa6669dad36 (diff)
downloadwee-slack-7fb51febd5cd1aebc7979bdeccb72f1832484536.tar.gz
Allows new queries to open
-rw-r--r--wee_slack.py6
1 files changed, 3 insertions, 3 deletions
diff --git a/wee_slack.py b/wee_slack.py
index 62f790f..dab61b0 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 not channel:
+ 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:
user = server.users.find(args)
if user:
user.create_dm_channel()
else:
server.buffer_prnt("User or channel {} not found.".format(args))
- if w.config_get_plugin('switch_buffer_on_join') != '0':
- w.buffer_set(channel.channel_buffer, "display", "1")
return True
else:
return False