aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorRyan Huber <rhuber@gmail.com>2016-04-22 07:56:49 -0700
committerRyan Huber <rhuber@gmail.com>2016-04-22 07:56:49 -0700
commit8397fded674b564458c4493ef02b3f86a3807b78 (patch)
tree7faf6f16c6b0ef256ba320788790c58fa552379c /wee_slack.py
parent4bedc30a4cfe4ff6aba9d1339a8da1305ea12ad8 (diff)
parentb94be714abe20f38f30f322dd676565f1311e084 (diff)
downloadwee-slack-8397fded674b564458c4493ef02b3f86a3807b78.tar.gz
Merge pull request #213 from bendem/fix/check-join-argument
Check that a parameter is passed to /join
Diffstat (limited to 'wee_slack.py')
-rw-r--r--wee_slack.py6
1 files changed, 5 insertions, 1 deletions
diff --git a/wee_slack.py b/wee_slack.py
index ab41b37..21cf0d3 100644
--- a/wee_slack.py
+++ b/wee_slack.py
@@ -987,7 +987,11 @@ def me_command_cb(data, current_buffer, args):
def join_command_cb(data, current_buffer, args):
- if command_talk(current_buffer, args.split()[1]):
+ args = args.split()
+ if len(args) < 2:
+ w.prnt(current_buffer, "Missing channel argument")
+ return w.WEECHAT_RC_OK_EAT
+ elif command_talk(current_buffer, args[1]):
return w.WEECHAT_RC_OK_EAT
else:
return w.WEECHAT_RC_OK