mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
feat(resources): added support for identifier prefix for older esx versions. (#244)
This commit is contained in:
1 parent
6a3bef1e34
commit
94633e53a6
3 files changed
+7
-2
No files matched your search
@@ -16,6 +16,7 @@
|
||||
"enableMultiChar": false
|
||||
},
|
||||
"database": {
|
||||
"useIdentifierPrefix": false,
|
||||
"playerTable": "users",
|
||||
"identifierColumn": "identifier"
|
||||
},
|
||||
|
||||
@@ -1,3 +1,5 @@
|
||||
import { config } from '../server';
|
||||
|
||||
export const getPlayerGameLicense = (src: number): null | string => {
|
||||
// Parse specifically for license identifier as its
|
||||
// guaranteed
|
||||
@@ -6,7 +8,8 @@ export const getPlayerGameLicense = (src: number): null | string => {
|
||||
let playerIdentifier;
|
||||
for (const identifier of playerIdentifiers) {
|
||||
if (identifier.includes('license:')) {
|
||||
playerIdentifier = identifier.split(':')[1];
|
||||
if (config.database.useIdentifierPrefix) playerIdentifier = identifier;
|
||||
else playerIdentifier = identifier.split(':')[1];
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
+2
-1
@@ -16,6 +16,7 @@ interface MatchConfig {
|
||||
generateProfileNameFromUsers: boolean;
|
||||
allowEditableProfileName: boolean;
|
||||
}
|
||||
|
||||
interface Debug {
|
||||
level: 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly';
|
||||
enabled: boolean;
|
||||
@@ -35,10 +36,10 @@ interface BankConfig {
|
||||
showNotifications: boolean;
|
||||
}
|
||||
|
||||
|
||||
interface DatabaseConfig {
|
||||
playerTable: string;
|
||||
identifierColumn: string;
|
||||
useIdentifierPrefix: boolean;
|
||||
}
|
||||
|
||||
export interface ResourceConfig {
|
||||
|
||||
Reference in new issue
Block a user