mirror of https://github.com/calzoneman/sync.git
Fix issues with chat logging after chat format refactoring
- Fix '<username.undefined>' in log - Fix channel log filter
This commit is contained in:
parent
dfa454618a
commit
85e413bcdf
|
@ -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);
|
||||
}
|
||||
};
|
||||
|
|
|
@ -1889,7 +1889,7 @@ function filterChannelLog() {
|
|||
return;
|
||||
}
|
||||
|
||||
if (chat && pre.match(/<[\w-]+\.>/)) {
|
||||
if (chat && pre.match(/<[\w-]+(\.\w*)?>/)) {
|
||||
include.push(line);
|
||||
return;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue