diff options
author | Ryan Huber <rhuber@gmail.com> | 2016-04-22 07:56:49 -0700 |
---|---|---|
committer | Ryan Huber <rhuber@gmail.com> | 2016-04-22 07:56:49 -0700 |
commit | 8397fded674b564458c4493ef02b3f86a3807b78 (patch) | |
tree | 7faf6f16c6b0ef256ba320788790c58fa552379c /wee_slack.py | |
parent | 4bedc30a4cfe4ff6aba9d1339a8da1305ea12ad8 (diff) | |
parent | b94be714abe20f38f30f322dd676565f1311e084 (diff) | |
download | wee-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.py | 6 |
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 |