Closed Bug 954759 Opened 10 years ago Closed 10 years ago

Commands are "not supported" when missing parameters or returning false

Categories

(Chat Core :: General, defect)

x86
All
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: aleth, Assigned: aleth)

Details

Attachments

(1 file)

*** Original post on bio 1327 at 2012-03-08 19:21:00 UTC ***

/me and /query and probably others give a system message "/msg is not a supported command. Type /help to see the list of commands." when entered without parameters, rather than the "/help msg" response which would be more appropriate.
*** Original post on bio 1327 by Myk Melez [:myk] <myk AT mozilla.org> at 2012-03-08 19:24:01 UTC ***

Note: /query also seems to require a msg parameter, which seems unconventional. In my experience with IRC clients, /msg may require such a parameter, but /query typically doesn't.  I.e. one can say:

/msg foo hello
/query foo hello

But also simply:

/query foo

(which opens a tab to foo without immediately sending a message)
*** Original post on bio 1327 at 2012-03-09 01:36:47 UTC ***

Happens whenever a command run method returns false. The fact that it has run means the command is supported, so the current message is definitely wrong and misleading. This probably shouldn't be fixed in the IRC protocol itself, but I'm unsure about the context or other implications.
Severity: minor → normal
Summary: IRC commands (/msg, /query) are "not supported" when missing parameters → IRC commands are "not supported" when missing parameters or returning false
Attached patch PatchSplinter Review
*** Original post on bio 1327 as attmnt 1243 at 2012-03-10 14:05:00 UTC ***

When all possible commands return false, but the command exists, run "/help command" (instead of returning false, which leads to the "unsupported command" error message). As far as I can see, this shouldn't cause any trouble?
Attachment #8352996 - Flags: review?(florian)
Component: IRC → General
Summary: IRC commands are "not supported" when missing parameters or returning false → Commands are "not supported" when missing parameters or returning false
Comment on attachment 8352996 [details] [diff] [review]
Patch

*** Original change on bio 1327 attmnt 1243 at 2012-03-12 23:45:35 UTC ***

I tested this and it works as advertised and I'm going to r+ it.

I do have some ideas I'd like to discuss before checking in though:
 - Have we thought about whether we should print a message before the help message? ("Wrong syntax used for command!", or something?)
 - I still find it strange that only the highest priority help message is printed but then we try all of them...but I don't think it makes sense to print out ALL the help information...
Attachment #8352996 - Flags: review?(florian) → review+
Assignee: nobody → aleth
Status: NEW → ASSIGNED
*** Original post on bio 1327 at 2012-03-13 00:13:28 UTC ***

(In reply to comment #4)
>  - Have we thought about whether we should print a message before the help
> message? ("Wrong syntax used for command!", or something?)

Without going through all the command handlers and having them return different values for "syntax error" and "command failed", the best one could do would be a message along the lines of "Oops! Something went wrong here.". Which might not even be a bad stopgap...
Whiteboard: [checkin-needed]
*** Original post on bio 1327 at 2012-03-20 22:40:58 UTC ***

Checked in as http://hg.instantbird.org/instantbird/rev/75f70f625cd6

Thanks for fixing this! If we wish to make this behavior better at all we'll open new bugs...
Status: ASSIGNED → RESOLVED
Closed: 10 years ago
Resolution: --- → FIXED
Whiteboard: [checkin-needed]
Target Milestone: --- → 1.2
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: