merge-requests/4/head
Matthew 2020-10-17 20:25:00 -04:00
parent 0b15ff3ad6
commit 0e2a9a74f1
No known key found for this signature in database
GPG Key ID: 210AF32ADE3B5C4B
1 changed files with 15 additions and 10 deletions

View File

@ -40,6 +40,7 @@ export default class CSCLI {
// FINISH VERIFICATION CHECKS
switch (parsed.Type) {
case 'score':
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);
@ -53,6 +54,10 @@ export default class CSCLI {
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 });