From 187ca119465637313895419b15f64bcf8d741ae8 Mon Sep 17 00:00:00 2001 From: James Lu Date: Mon, 7 Aug 2017 00:48:28 -0700 Subject: [PATCH] commands: show an error if 'echo' is called without a text argument. --- plugins/commands.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/plugins/commands.py b/plugins/commands.py index fe970a3..bcde337 100644 --- a/plugins/commands.py +++ b/plugins/commands.py @@ -143,6 +143,9 @@ def echo(irc, source, args): Echoes the text given.""" permissions.check_permissions(irc, source, ['commands.echo']) + if not args: + irc.error('No text to send!') + return irc.reply(' '.join(args)) def _check_logout_access(irc, source, target, perms):