aboutsummaryrefslogtreecommitdiffstats
path: root/wee_slack.py
diff options
context:
space:
mode:
authorTrygve Aaberge <trygveaa@gmail.com>2023-09-16 23:07:30 +0200
committerTrygve Aaberge <trygveaa@gmail.com>2023-09-16 23:09:31 +0200
commit10719274e261df62828e184b360883e541ed57d6 (patch)
tree2c05bb04ecc3aacf5e815a898b34f9bcbaad1c1f /wee_slack.py
parent6478c1410f52183262938daf52bc7e88c062f528 (diff)
downloadwee-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.py7
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