From c35774d9b8549600a50f707f4bcb4d0e670692e5 Mon Sep 17 00:00:00 2001 From: aleth Date: Tue, 20 Mar 2012 22:50:32 +0100 Subject: [PATCH] Bug 753807 - Land in comm-central Instantbird's changes to chat/ - Bio 1327 - Commands are "not supported" when missing parameters or returning false, r=clokep. --- chat/components/src/imCommands.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/chat/components/src/imCommands.js b/chat/components/src/imCommands.js index 565c18a17f..35d4f5099a 100644 --- a/chat/components/src/imCommands.js +++ b/chat/components/src/imCommands.js @@ -242,7 +242,11 @@ CommandsService.prototype = { // cmdArray contains commands sorted by priority, attempt to apply // them in order until one succeeds. - return cmdArray.some(function (aCmd) aCmd.run(args, aConversation)); + if (!cmdArray.some(function (aCmd) aCmd.run(args, aConversation))) { + // If they all failed, print help message. + this.executeCommand("/help " + name, aConversation); + } + return true; }, QueryInterface: XPCOMUtils.generateQI([Ci.imICommandsService]),