Closed
Bug 1021362
Opened 11 years ago
Closed 11 years ago
/msg foo tries to send the message "foo" to a blank nick
Categories
(Chat Core :: IRC, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
1.6
People
(Reporter: nhnt11, Assigned: nhnt11)
Details
Attachments
(1 file, 1 obsolete file)
1.05 KB,
patch
|
clokep
:
review+
|
Details | Diff | Splinter Review |
Typing |/msg foo| (two spaces between /msg and foo) in a conversation window is expected to open a conversation with foo, but instead tries to send the message "foo" to a blank nick. This results in the following error:
Timestamp: 06/06/14 5:25:55 am
Error: ERR_NOTEXTTOSEND: No text to send for PRIVMSG.
Source File: resource://gre/modules/ircBase.jsm
Line: 1127
Source Code:
prpl-irc: ircBase.commands[412]
This makes me think that when sending the raw message, IRC sees it as sending a message to a nick "foo" but there's no message (I'm thinking the line is something like |PRIVMSG foo|).
Assignee | ||
Comment 1•11 years ago
|
||
Trim leading whitespace in messageCommand().
Attachment #8435396 -
Flags: review?(clokep)
Comment 2•11 years ago
|
||
Comment on attachment 8435396 [details] [diff] [review]
Patch
Review of attachment 8435396 [details] [diff] [review]:
-----------------------------------------------------------------
::: chat/protocols/irc/ircCommands.jsm
@@ +43,5 @@
> // aMsg is <user> <message>
> // aReturnedConv is optional and returns the resulting conversation.
> function messageCommand(aMsg, aConv, aReturnedConv) {
> + // Trim leading whitespace.
> + aMsg = aMsg.replace(/^\s+/, "");
Seems that there is a trimLeft function. I imagine this has better performance than a regexp: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/String/trimLeft
Attachment #8435396 -
Flags: review?(clokep) → review-
Assignee | ||
Comment 3•11 years ago
|
||
Attachment #8435396 -
Attachment is obsolete: true
Attachment #8436066 -
Flags: review?(clokep)
Updated•11 years ago
|
Attachment #8436066 -
Flags: review?(clokep) → review+
Assignee | ||
Updated•11 years ago
|
Keywords: checkin-needed
Comment 4•11 years ago
|
||
Assignee: nobody → nhnt11
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Updated•11 years ago
|
Target Milestone: --- → 1.6
You need to log in
before you can comment on or make changes to this bug.
Description
•