diff options
author | Ryan Huber <rhuber@gmail.com> | 2015-08-01 10:49:43 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2015-08-01 10:49:43 -0700 |
commit | 027a2218948558825e67c7efe50b1226107aafa8 (patch) | |
tree | 08b33ddbee253e52c6662f3d6662c31a6d083a85 /wee_slack.py | |
parent | 1df3e39e92d7b2d949071b21e0a4f275d031135f (diff) | |
download | wee-slack-027a2218948558825e67c7efe50b1226107aafa8.tar.gz |
switch to /query buffer by default - option to disable
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py index 1a497bc..f368dff 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -836,7 +836,10 @@ def me_command_cb(data, current_buffer, args): def join_command_cb(data, current_buffer, args): if channels.find(current_buffer) or servers.find(current_buffer): channel = args.split()[1] - servers.find(current_domain_name()).channels.find(channel).open() + channel = servers.find(current_domain_name()).channels.find(channel) + channel.open() + if w.config_get_plugin('switch_buffer_on_join') != '0': + w.buffer_set(channel.channel_buffer, "display", "1") return w.WEECHAT_RC_OK_EAT else: return w.WEECHAT_RC_OK @@ -1854,6 +1857,8 @@ if __name__ == "__main__": w.config_set_plugin('trigger_value', "0") if not w.config_get_plugin('unfurl_ignore_alt_text'): w.config_set_plugin('unfurl_ignore_alt_text', "0") + if not w.config_get_plugin('switch_buffer_on_join'): + w.config_set_plugin('switch_buffer_on_join', "1") version = w.info_get("version_number", "") or 0 if int(version) >= 0x00040400: |