Added cold-persistance to Channel Chat Buffer via periodic DB saves based on chat activity.
This commit is contained in:
parent
366df357b8
commit
c64b315fdf
7 changed files with 124 additions and 5 deletions
|
|
@ -141,7 +141,7 @@ module.exports = class{
|
|||
const channel = this.server.activeChannels.get(chan);
|
||||
|
||||
//If chat buffer length is over mandated size
|
||||
if(channel.chatBuffer.length >= this.chatBufferSize){
|
||||
if(channel.chatBuffer.buffer.length >= this.chatBufferSize){
|
||||
//Take out oldest chat
|
||||
channel.chatBuffer.shift();
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue