From: Darren Date: Sun, 12 Jan 2014 20:48:44 +0000 (+0000) Subject: Less strict IRC parsing to allow non-latin characters #376 #202 X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=b38c590f77399efd8cd8540ed6cdc82c741f3ce3;p=KiwiIRC.git Less strict IRC parsing to allow non-latin characters #376 #202 --- diff --git a/server/irc/connection.js b/server/irc/connection.js index c807c21..06d4e2f 100644 --- a/server/irc/connection.js +++ b/server/irc/connection.js @@ -713,7 +713,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 = /^(?:(?:(?:@([^ ]+) )?):(?:([^\s!]+)|([^\s!]+)!([^\s@]+)@?([^\s]+)?) )?(\S+)(?: (?!:)(.+?))?(?: :(.*))?$/i; function parseIrcLine(buffer_line) { var msg,