From ee7ce27b61d307d7e445a6ae76114371085a2dea Mon Sep 17 00:00:00 2001 From: James Vega Date: Fri, 7 Nov 2003 18:51:49 +0000 Subject: [PATCH] @echo should reply with help when it receives no arguments --- plugins/Utilities.py | 2 ++ test/test_Utilities.py | 1 + 2 files changed, 3 insertions(+) diff --git a/plugins/Utilities.py b/plugins/Utilities.py index 5a5122d07..7f94bc2b1 100644 --- a/plugins/Utilities.py +++ b/plugins/Utilities.py @@ -122,6 +122,8 @@ class Utilities(callbacks.Privmsg): Returns the arguments given it. """ + if not args: + raise callbacks.ArgumentError irc.reply(msg, ' '.join(args), prefixName=False) def action(self, irc, msg, args): diff --git a/test/test_Utilities.py b/test/test_Utilities.py index 49a505ebe..066b9ac11 100644 --- a/test/test_Utilities.py +++ b/test/test_Utilities.py @@ -61,6 +61,7 @@ class UtilitiesTestCase(PluginTestCase, PluginDocumentation): self.assertResponse('strconcat foo bar baz', 'foobar baz') def testEcho(self): + self.assertHelp('echo') self.assertResponse('echo foo', 'foo') m = self.getMsg('cpustats') self.assertResponse('echo "%s"' % m.args[1], m.args[1])