From 85e413bcdf5a73ca377743e28fb44650e7b7e4e8 Mon Sep 17 00:00:00 2001 From: calzoneman Date: Wed, 20 Nov 2013 10:10:01 -0600 Subject: [PATCH] Fix issues with chat logging after chat format refactoring - Fix '' in log - Fix channel log filter --- lib/channel.js | 13 +------------ www/assets/js/util.js | 2 +- 2 files changed, 2 insertions(+), 13 deletions(-) diff --git a/lib/channel.js b/lib/channel.js index ce7818ff..f3332153 100644 --- a/lib/channel.js +++ b/lib/channel.js @@ -2258,17 +2258,6 @@ Channel.prototype.tryChat = function(user, data) { } } -Channel.prototype.chainMessage = function(user, msg, data) { - if(msg.indexOf("/") == 0) - ChatCommand.handle(this, user, msg, data); - - else if(msg.indexOf(">") == 0) - this.sendMessage(user.name, msg, "greentext", data); - - else - this.sendMessage(user.name, msg, "", data); -} - Channel.prototype.filterMessage = function(msg) { const link = /(\w+:\/\/(?:[^:\/\[\]\s]+|\[[0-9a-f:]+\])(?::\d+)?(?:\/[^\/\s]*)*)/ig; var subs = msg.split(link); @@ -2318,7 +2307,7 @@ Channel.prototype.sendMessage = function (user, msg, meta, filter) { if(this.chatbuffer.length > 15) this.chatbuffer.shift(); var unescaped = sanitize(msg).entityDecode(); - this.logger.log("<" + user.name + (meta.addClass ? "." + meta.addclass : "") + this.logger.log("<" + user.name + (meta.addClass ? "." + meta.addClass : "") + "> " + unescaped); } }; diff --git a/www/assets/js/util.js b/www/assets/js/util.js index f2b96f9f..47e5ac90 100644 --- a/www/assets/js/util.js +++ b/www/assets/js/util.js @@ -1889,7 +1889,7 @@ function filterChannelLog() { return; } - if (chat && pre.match(/<[\w-]+\.>/)) { + if (chat && pre.match(/<[\w-]+(\.\w*)?>/)) { include.push(line); return; }