Fixed chat history bug

This commit is contained in:
Fluffy Jenkins 2020-01-08 04:42:00 +00:00
parent d27d9645bd
commit cb9563ab09

View file

@ -361,8 +361,8 @@ function time() {
function addToLog(msg, dp, colour, tab) { function addToLog(msg, dp, colour, tab) {
historyLog.push([time(), msg, dp, colour, tab]); historyLog.push([time(), msg, dp, colour, tab]);
chatHistory.emitScriptEvent(JSON.stringify({type: "MSG", data: [[time(), msg, dp, colour, tab]]})); chatHistory.emitScriptEvent(JSON.stringify({type: "MSG", data: [[time(), msg, dp, colour, tab]]}));
if (historyLog.length > 500) { while(historyLog.length > 500) {
historyLog.pop(); historyLog.shift();
} }
Settings.setValue(settingsRoot + "/HistoryLog", JSON.stringify(historyLog)) Settings.setValue(settingsRoot + "/HistoryLog", JSON.stringify(historyLog))
} }