Skip to content
Snippets Groups Projects
Commit 28d6adb7 authored by Deucе's avatar Deucе :ok_hand_tone4:
Browse files

Don't lock players for read during maint

This should fix issue #893, but it's hard to tell for sure, the docs
for JSON db are a bit sparse.
parent 64a6a0d5
No related branches found
No related tags found
No related merge requests found
......@@ -50,7 +50,7 @@ function DeleteInactive()
{
console.writeln("Deleting inactive players");
var oldest_allowed=strftime("%Y:%m:%d",time()-Settings.DaysInactivity*86400);
var allplayers=db.read(Settings.DB,'players',LOCK_READ);
var allplayers=db.read(Settings.DB,'players');
for(i=1; i<allplayers.length; i++) {
if(allplayers[i].QWKID==system.qwk_id && allplayers[i].UserNumber > 0) {
if((!file_exists(system.data_dir+format("user/%04d.tw2",allplayers[i].UserNumber))) || (allplayers[i].LastOnDay < oldest_allowed && allplayers[i].KilledBy != 0)) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment