aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTollef Fog Heen <tfheen@err.no>2018-05-21 10:56:33 +0200
committerTollef Fog Heen <tfheen@err.no>2018-05-21 10:56:33 +0200
commite69e1ace2fd35c4b3cdec8f7bb41e3e2eefe0eee (patch)
treeb4553191f3912213ddcd9fdbba9e5398db54de7b
parentb2f3fabc0cdd9638af7cfab9be758fea94698797 (diff)
downloadwee-slack-e69e1ace2fd35c4b3cdec8f7bb41e3e2eefe0eee.tar.gz
Handle spaces in tokens correctly instead of shouting at people to avoid them
-rw-r--r--README.md2
-rw-r--r--wee_slack.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/README.md b/README.md
index ff4d945..4b65f64 100644
--- a/README.md
+++ b/README.md
@@ -120,7 +120,7 @@ If you don't want to store your API token in plaintext you can use the secure fe
/set plugins.var.python.slack.slack_api_token ${sec.data.slack_token}
```
-##### Optional: If you would like to connect to multiple groups, use the above command with multiple tokens separated by commas. (NO SPACES)
+##### Optional: If you would like to connect to multiple groups, use the above command with multiple tokens separated by commas.
```
/set plugins.var.python.slack.slack_api_token [token1],[token2],[token3]
diff --git a/wee_slack.py b/wee_slack.py
index 820f99f..27ec621 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -3902,7 +3902,7 @@ if __name__ == "__main__":
# attach to the weechat hooks we need
- tokens = config.slack_api_token.split(',')
+ tokens = map(string.strip, config.slack_api_token.split(','))
for t in tokens:
s = initiate_connection(t)
EVENTROUTER.receive(s)