Permalink
Browse files

Merge branch 'patch-1' of git://github.com/qsheets/node-irc into qshe…

…ets-patch-1
  • Loading branch information...
2 parents 099da4e + af6f07f commit 8b0e282e7b0a0368973e4070f6b94ba988aaa2dc @martynsmith committed Jan 20, 2013
Showing with 2 additions and 2 deletions.
  1. +2 −2 lib/irc.js
View
@@ -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];
}

0 comments on commit 8b0e282

Please sign in to comment.