mirror of
https://github.com/darksaid98/new-phone-who-dis.git
synced 2026-12-02 14:38:46 +00:00
19 lines
572 B
TypeScript
19 lines
572 B
TypeScript
import { config } from '../server';
|
|
|
|
export const getPlayerGameLicense = (src: number): null | string => {
|
|
// Parse specifically for license identifier as its
|
|
// guaranteed
|
|
const playerIdentifiers = getPlayerIdentifiers(src.toString());
|
|
|
|
let playerIdentifier;
|
|
for (const identifier of playerIdentifiers) {
|
|
if (identifier.includes('license:')) {
|
|
if (config.database.useIdentifierPrefix) playerIdentifier = identifier;
|
|
else playerIdentifier = identifier.split(':')[1];
|
|
}
|
|
}
|
|
|
|
if (!playerIdentifier) return null;
|
|
return playerIdentifier;
|
|
};
|