From a6b9c6099d6e8c05892968aac5c3333edad2bad7 Mon Sep 17 00:00:00 2001 From: HF Date: Fri, 23 Sep 2022 16:32:05 +0200 Subject: [PATCH] adjust banme --- src/components/GlobalCaptcha.jsx | 6 ++++-- src/routes/api/banme.js | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/src/components/GlobalCaptcha.jsx b/src/components/GlobalCaptcha.jsx index 71705e4..65e099d 100644 --- a/src/components/GlobalCaptcha.jsx +++ b/src/components/GlobalCaptcha.jsx @@ -29,8 +29,10 @@ const GlobalCaptcha = ({ close }) => { } // ---- const test = document.getElementById('void-bot'); - if (!legit || test) { - await requestBanMe((legit) ? 1 : 2); + if (test) { + await requestBanMe(1); + } else if (!legit) { + await requestBanMe(2); } // ---- const captchaid = e.target.captchaid.value; diff --git a/src/routes/api/banme.js b/src/routes/api/banme.js index 01795ab..d5ca4c2 100644 --- a/src/routes/api/banme.js +++ b/src/routes/api/banme.js @@ -17,7 +17,7 @@ async function banme(req, res) { let expires = 0; if (code === 1) { reason = 'Userscript Bot'; - expires = Date.now() + 1000 * 3600 * 24 * 7; + expires = Date.now() + 1000 * 3600 * 24 * 3; /* * ignore it for now to collect data manually *