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)

x86
macOS
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: nhnt11, Assigned: nhnt11)

Details

Attachments

(1 file, 1 obsolete file)

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|).
Attached patch Patch (obsolete) — Splinter Review
Trim leading whitespace in messageCommand().
Attachment #8435396 - Flags: review?(clokep)
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-
Attachment #8435396 - Attachment is obsolete: true
Attachment #8436066 - Flags: review?(clokep)
Attachment #8436066 - Flags: review?(clokep) → review+
Assignee: nobody → nhnt11
Status: NEW → RESOLVED
Closed: 11 years ago
Keywords: checkin-needed
Resolution: --- → FIXED
Target Milestone: --- → 1.6
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: