Additions to PlayerList and many other small changes

This commit is contained in:
Natsumi
2022-01-08 18:33:07 +13:00
parent 4a0aef8ce3
commit d03b8a8310
4 changed files with 113 additions and 48 deletions

View File

@@ -721,7 +721,12 @@ class Database {
return size;
}
async getLastVisit(input) {
async getLastVisit(input, currentWorldMatch) {
if (currentWorldMatch) {
var count = 2;
} else {
var count = 1;
}
var worldId = input.replaceAll("'", '');
var ref = {
created_at: '',
@@ -732,7 +737,7 @@ class Database {
created_at: row[0],
worldId: row[1]
};
}, `SELECT created_at, world_id FROM gamelog_location WHERE world_id = '${worldId}' ORDER BY id DESC LIMIT 1`);
}, `SELECT created_at, world_id FROM gamelog_location WHERE world_id = '${worldId}' ORDER BY id DESC LIMIT ${count}`);
return ref;
}