From: Jack Allnutt Date: Sat, 28 Sep 2013 16:50:40 +0000 (+0100) Subject: Fix parse_regex X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=ad590288aa67bdffef795f005678000d663e9adb;p=KiwiIRC.git Fix parse_regex The regex was incorrectly capturing the @ from message tags --- diff --git a/server/irc/connection.js b/server/irc/connection.js index 5278ad1..49c7c81 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -700,7 +700,7 @@ function socketOnData(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\.\-*]+)!([^\x00\r\n\ ]+?)@?([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; function parseIrcLine(buffer_line) { var msg,