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