mirror of
https://github.com/HifiExperiments/overte.git
synced 2025-05-28 22:49:54 +02:00
Fixed chat history bug
This commit is contained in:
parent
d27d9645bd
commit
cb9563ab09
1 changed files with 2 additions and 2 deletions
|
@ -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))
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue