mirror of
https://github.com/lubosz/overte.git
synced 2025-04-19 17:03:43 +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) {
|
||||
historyLog.push([time(), msg, dp, colour, tab]);
|
||||
chatHistory.emitScriptEvent(JSON.stringify({type: "MSG", data: [[time(), msg, dp, colour, tab]]}));
|
||||
if (historyLog.length > 500) {
|
||||
historyLog.pop();
|
||||
while(historyLog.length > 500) {
|
||||
historyLog.shift();
|
||||
}
|
||||
Settings.setValue(settingsRoot + "/HistoryLog", JSON.stringify(historyLog))
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue