mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-04 22:16:40 +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
|
"enableMultiChar": false
|
||||||
},
|
},
|
||||||
"database": {
|
"database": {
|
||||||
|
"useIdentifierPrefix": false,
|
||||||
"playerTable": "users",
|
"playerTable": "users",
|
||||||
"identifierColumn": "identifier"
|
"identifierColumn": "identifier"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -1,3 +1,5 @@
|
|||||||
|
import { config } from '../server';
|
||||||
|
|
||||||
export const getPlayerGameLicense = (src: number): null | string => {
|
export const getPlayerGameLicense = (src: number): null | string => {
|
||||||
// Parse specifically for license identifier as its
|
// Parse specifically for license identifier as its
|
||||||
// guaranteed
|
// guaranteed
|
||||||
@@ -6,7 +8,8 @@ export const getPlayerGameLicense = (src: number): null | string => {
|
|||||||
let playerIdentifier;
|
let playerIdentifier;
|
||||||
for (const identifier of playerIdentifiers) {
|
for (const identifier of playerIdentifiers) {
|
||||||
if (identifier.includes('license:')) {
|
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;
|
generateProfileNameFromUsers: boolean;
|
||||||
allowEditableProfileName: boolean;
|
allowEditableProfileName: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
interface Debug {
|
interface Debug {
|
||||||
level: 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly';
|
level: 'error' | 'warn' | 'info' | 'verbose' | 'debug' | 'silly';
|
||||||
enabled: boolean;
|
enabled: boolean;
|
||||||
@@ -35,10 +36,10 @@ interface BankConfig {
|
|||||||
showNotifications: boolean;
|
showNotifications: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
interface DatabaseConfig {
|
interface DatabaseConfig {
|
||||||
playerTable: string;
|
playerTable: string;
|
||||||
identifierColumn: string;
|
identifierColumn: string;
|
||||||
|
useIdentifierPrefix: boolean;
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface ResourceConfig {
|
export interface ResourceConfig {
|
||||||
|
|||||||
Reference in new issue
Block a user