fixes
parent
0b15ff3ad6
commit
0e2a9a74f1
|
@ -40,19 +40,24 @@ export default class CSCLI {
|
|||
// FINISH VERIFICATION CHECKS
|
||||
switch (parsed.Type) {
|
||||
case 'score':
|
||||
const acc = await this.client.db.Account.findOne({ username: parsed.Username });
|
||||
if (!acc) { socket.destroy(); break; }
|
||||
const pin = await Report.getPIN(acc.userID, this.client.config.internalKey);
|
||||
if (pin.status !== 'SUCCESS') { socket.destroy(); break; }
|
||||
try {
|
||||
const acc = await this.client.db.Account.findOne({ username: parsed.Username });
|
||||
if (!acc) { socket.destroy(); break; }
|
||||
const pin = await Report.getPIN(acc.userID, this.client.config.internalKey);
|
||||
if (pin.status !== 'SUCCESS') { socket.destroy(); break; }
|
||||
|
||||
const report = await Report.soft(acc.userID, pin.pin[2], this.client.config.vendorKey);
|
||||
if (report.status !== 'SUCCESS') { socket.destroy(); break; }
|
||||
const report = await Report.soft(acc.userID, pin.pin[2], this.client.config.vendorKey);
|
||||
if (report.status !== 'SUCCESS') { socket.destroy(); break; }
|
||||
|
||||
if (!report.totalScore) { socket.write('N/C\n'); socket.destroy(); break; }
|
||||
if (report.totalScore === 0) { socket.write('---\n'); socket.destroy(); break; }
|
||||
if (!report.totalScore) { socket.write('N/C\n'); socket.destroy(); break; }
|
||||
if (report.totalScore === 0) { socket.write('---\n'); socket.destroy(); break; }
|
||||
|
||||
socket.write(`${report.totalScore}\n`);
|
||||
socket.destroy();
|
||||
socket.write(`${report.totalScore}\n`);
|
||||
socket.destroy();
|
||||
} catch {
|
||||
socket.write('---\n');
|
||||
socket.destroy();
|
||||
}
|
||||
break;
|
||||
case 'lock':
|
||||
await this.client.util.accounts.lock(parsed.Username, this.client.user.id, { reason: parsed.Message });
|
||||
|
|
Loading…
Reference in New Issue