From 3c4a7f0fcd64aabb3a2400108963035dfe7a0740 Mon Sep 17 00:00:00 2001 From: Trygve Aaberge Date: Mon, 28 Mar 2016 21:22:57 +0200 Subject: Set server localvar to team name Instead of setting the buffer localvar server to the domain ($team.slack.com), set it to only the team name. This makes it more like what the irc plugin sets, which is the server name. --- wee_slack.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'wee_slack.py') diff --git a/wee_slack.py b/wee_slack.py index 11430f7..f2f49c2 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -132,6 +132,7 @@ class SlackServer(object): def __init__(self, token): self.nick = None self.name = None + self.team = None self.domain = None self.server_buffer_name = None self.login_data = None @@ -213,6 +214,7 @@ class SlackServer(object): def connected_to_slack(self, login_data): if login_data["ok"]: + self.team = login_data["team"]["domain"] self.domain = login_data["team"]["domain"] + ".slack.com" dbg("connected to {}".format(self.domain)) self.identifier = self.domain @@ -420,7 +422,7 @@ class Channel(object): else: w.buffer_set(self.channel_buffer, "localvar_set_type", 'channel') w.buffer_set(self.channel_buffer, "localvar_set_channel", self.name) - w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.server_buffer_name) + w.buffer_set(self.channel_buffer, "localvar_set_server", self.server.team) w.buffer_set(self.channel_buffer, "short_name", self.name) buffer_list_update_next() -- cgit