Skip to content

Commit

Permalink
Fix for receiving messages with colons
Browse files Browse the repository at this point in the history
This fixes issues #122, #128 and #133.

Example lines include:
    :some.irc.net 324 webuser #channel +Cnj 5:10
    :nick!user@host QUIT :Ping timeout: 252 seconds
    :nick!user@host PRIVMSG #channel :so : colons: :are :: not a problem ::::
  • Loading branch information
quentinxs committed Jan 19, 2013
1 parent 3588438 commit af6f07f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions lib/irc.js
Original file line number Diff line number Diff line change
Expand Up @@ -872,8 +872,8 @@ function parseMessage(line, stripColors) { // {{{
var middle, trailing;

// Parse parameters
if ( line.indexOf(':') != -1 ) {
match = line.match(/(.*)(?:^:|\s+:)(.*)/);
if ( line.search(/^:|\s+:/) != -1 ) {
match = line.match(/(.*?)(?:^:|\s+:)(.*)/);
middle = match[1].trimRight();
trailing = match[2];
}
Expand Down

0 comments on commit af6f07f

Please sign in to comment.