diff options
author | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-16 23:07:30 +0200 |
---|---|---|
committer | Trygve Aaberge <trygveaa@gmail.com> | 2023-09-16 23:09:31 +0200 |
commit | 10719274e261df62828e184b360883e541ed57d6 (patch) | |
tree | 2c05bb04ecc3aacf5e815a898b34f9bcbaad1c1f /wee_slack.py | |
parent | 6478c1410f52183262938daf52bc7e88c062f528 (diff) | |
download | wee-slack-10719274e261df62828e184b360883e541ed57d6.tar.gz |
Print error message when running /reply without any arguments
Fixes #900
Diffstat (limited to 'wee_slack.py')
-rw-r--r-- | wee_slack.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/wee_slack.py b/wee_slack.py index 0824268..cd890e6 100644 --- a/wee_slack.py +++ b/wee_slack.py @@ -5957,7 +5957,14 @@ def command_reply(data, current_buffer, args): In either case, -alsochannel also sends the reply to the parent channel. """ channel = EVENTROUTER.weechat_controller.buffers[current_buffer] + parts = args.split(None, 1) + if len(parts) < 1: + w.prnt( + "", 'Too few arguments for command "/reply" (help on command: /help reply)' + ) + return w.WEECHAT_RC_ERROR + if parts[0] == "-alsochannel": args = parts[1] broadcast = True |