mirror of
https://github.com/monkeytypegame/monkeytype.git
synced 2025-09-12 09:37:29 +08:00
added log message
using implemented checking function
This commit is contained in:
parent
8c3c6d004d
commit
e18da7da87
1 changed files with 3 additions and 2 deletions
|
@ -19,6 +19,7 @@ const objecthash = node_object_hash().hash;
|
|||
|
||||
try {
|
||||
if (anticheatImplemented() === false) throw new Error("undefined");
|
||||
console.log("Anticheat module loaded");
|
||||
} catch (e) {
|
||||
if (process.env.MODE === "dev") {
|
||||
console.error(
|
||||
|
@ -115,7 +116,7 @@ class ResultController {
|
|||
}
|
||||
}
|
||||
|
||||
if (validateResult) {
|
||||
if (anticheatImplemented()) {
|
||||
if (!validateResult(result)) {
|
||||
throw new MonkeyError(400, "Result data doesn't make sense");
|
||||
}
|
||||
|
@ -221,7 +222,7 @@ class ResultController {
|
|||
result.keySpacingStats !== null &&
|
||||
result.keyDurationStats !== null
|
||||
) {
|
||||
if (validateKeys) {
|
||||
if (anticheatImplemented()) {
|
||||
if (!validateKeys(result, uid)) {
|
||||
throw new MonkeyError(400, "Possible bot detected");
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue