aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2017-02-06 12:26:10 -0800
committerRyan Huber <rhuber@gmail.com>2017-02-06 12:26:10 -0800
commit207b927eb97a089e4979c805583645b2ca78df80 (patch)
treecf264580ef40adc8994edc1357249923eeb06237 /wee_slack.py
parent99822b22b4e1cb82782100564b6504c6a240dd05 (diff)
downloadwee-slack-207b927eb97a089e4979c805583645b2ca78df80.tar.gz
option to use server buffers w/o full domain name
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index daaa74d..fd09b49 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -791,7 +791,8 @@ class SlackTeam(object):
# self.eventrouter.weechat_controller.unregister_buffer(self.channel_buffer, update_remote=False, close_buffer=True)
def create_buffer(self):
if not self.channel_buffer:
- self.channel_buffer = w.buffer_new("{}".format(self.domain), "buffer_input_callback", "EVENTROUTER", "", "")
+ bname = self.subdomain if config.short_buffer_names else self.domain
+ self.channel_buffer = w.buffer_new("{}".format(bname), "buffer_input_callback", "EVENTROUTER", "", "")
self.eventrouter.weechat_controller.register_buffer(self.channel_buffer, self)
w.buffer_set(self.channel_buffer, "localvar_set_type", 'server')
if w.config_string(w.config_get('irc.look.server_buffer')) == 'merge_with_core':
@@ -2539,6 +2540,7 @@ class PluginConfig(object):
'record_events': 'false',
'thread_suffix_color': 'lightcyan',
'unhide_buffers_with_activity': 'false',
+ 'short_buffer_names': 'false',
}
# Set missing settings to their defaults. Load non-missing settings from