From: Jack Allnutt Date: Mon, 3 Jun 2013 12:32:51 +0000 (+0100) Subject: Bring parse regex inline with RFC for user part of the prefix X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=85e1be6c901f31e46a13bf3d3fb72681c0a2d64a;p=KiwiIRC.git Bring parse regex inline with RFC for user part of the prefix Fixes #283 --- diff --git a/server/irc/connection.js b/server/irc/connection.js index 9e9ab3b..88d7758 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -407,7 +407,7 @@ function findWebIrc(connect_data) { * Deviates from the RFC a little to support the '/' character now used in some * IRCds */ -var parse_regex = /^(?:(?:(?:(@[^ ]+) )?):(?:([a-z0-9\x5B-\x60\x7B-\x7D\.\-*]+)|([a-z0-9\x5B-\x60\x7B-\x7D\.\-*]+)!([a-z0-9~\.\-_|]+)@?([a-z0-9\.\-:\/_]+)?) )?(\S+)(?: (?!:)(.+?))?(?: :(.+))?$/i; +var parse_regex = /^(?:(?:(?:(@[^ ]+) )?):(?:([a-z0-9\x5B-\x60\x7B-\x7D\.\-*]+)|([a-z0-9\x5B-\x60\x7B-\x7D\.\-*]+)!([^\x00\r\n\ ]+?)@?([a-z0-9\.\-:\/_]+)?) )?(\S+)(?: (?!:)(.+?))?(?: :(.+))?$/i; var parse = function (data) { var i,