From d6e9bff70a7b08df6bbbc9cf280cf5ec2dc14d32 Mon Sep 17 00:00:00 2001 From: Darren Date: Tue, 30 Aug 2011 00:35:42 +0100 Subject: [PATCH] Extended characters supported in parsing an IRC line, user host. '/' --- node/app.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/node/app.js b/node/app.js index c7c5ee3..b462255 100644 --- a/node/app.js +++ b/node/app.js @@ -106,7 +106,7 @@ var ircNumerics = { this.parseIRCMessage = function (websocket, ircSocket, data) { /*global ircSocketDataHandler */ var msg, regex, opts, options, opt, i, j, matches, nick, users, chan, channel, params, prefix, prefixes, nicklist, caps, rtn, obj; - regex = /^(?::(?:([a-z0-9\x5B-\x60\x7B-\x7D\.\-]+)|([a-z0-9\x5B-\x60\x7B-\x7D\.\-]+)!([a-z0-9~\.\-_|]+)@?([a-z0-9\.\-:]+)?) )?([a-z0-9]+)(?:(?: ([^:]+))?(?: :(.+))?)$/i; + regex = /^(?::(?:([a-z0-9\x5B-\x60\x7B-\x7D\.\-]+)|([a-z0-9\x5B-\x60\x7B-\x7D\.\-]+)!([a-z0-9~\.\-_|]+)@?([a-z0-9\.\-:\/]+)?) )?([a-z0-9]+)(?:(?: ([^:]+))?(?: :(.+))?)$/i; msg = regex.exec(data); if (msg) { msg = { @@ -401,7 +401,7 @@ this.parseIRCMessage = function (websocket, ircSocket, data) { console.log("Unknown command (" + String(msg.command).toUpperCase() + ")"); } } else { - console.log("Malformed IRC line"); + console.log("Malformed IRC line: " + data); } }; -- 2.25.1