This commit is contained in:
Christopher committed 2021-06-02 23:20:05 +02:00
commit c48b7333e2
7 files changed
+11 -38

No files matched your search

+1 -1
View File
@@ -8,7 +8,7 @@ export class _ContactsDB {
limit = FetchDefaultLimits.CONTACTS_FETCH_LIMIT,
): Promise<Contact[]> {
const query =
'SELECT * FROM npwd_phone_contacts WHERE identifier = ? ORDER BY display ASC LIMIT ?';
'SELECT * FROM npwd_phone_contacts WHERE identifier = ? ORDER BY display ASC';
const [results] = await pool.query(query, [identifier, limit]);
return <Contact[]>results;
}
@@ -25,7 +25,11 @@ if (!config.general.enableMultiChar) {
on('playerDropped', () => {
const src = getSource();
// Get identifier for player to remove
PlayerService.handleUnloadPlayerEvent(src, true);
try {
PlayerService.handleUnloadPlayerEvent(src, true);
} catch (e) {
playerLogger.debug(`${src} failed to unload, likely was never loaded in the first place.`)
}
});
// Can use this to debug the player table if needed. Disabled by default