@echo should reply with help when it receives no arguments

This commit is contained in:
James Vega 2003-11-07 18:51:49 +00:00
parent ca8ed7204b
commit ee7ce27b61
2 changed files with 3 additions and 0 deletions

View File

@ -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):

View File

@ -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])