aboutsummaryrefslogtreecommitdiff
path: root/webAO
diff options
context:
space:
mode:
authorOsmium Sorcerer <os@sof.beauty>2026-04-07 03:16:18 +0000
committerOsmium Sorcerer <os@sof.beauty>2026-06-06 03:09:27 +0000
commitcf0cd1cd8838f402502d89ea2055caaaa8a866b5 (patch)
tree67a4f286281d78b834f6ae014a82ec825effec3e /webAO
parent31275da317fd58739974ac49c995bca2f7dbcc08 (diff)
Remove defunct CAPTCHA
The hCaptcha integration has been abandoned for a while. It added yet another questionable third-party API (which also set a Cloudflare cookie), and its effectiveness is unclear considering its client-side nature. A custom CAPTCHA implementation (such as PoW challenge) is an interesting prospect, but it'll require proper server-side support.
Diffstat (limited to 'webAO')
-rw-r--r--webAO/client.ts8
-rw-r--r--webAO/dom/twofactor.ts9
-rw-r--r--webAO/dom/window.ts1
3 files changed, 0 insertions, 18 deletions
diff --git a/webAO/client.ts b/webAO/client.ts
index ab39ee9..50eb18b 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -136,7 +136,6 @@ class Client extends EventEmitter {
musics: any;
musics_time: boolean;
callwords: string[];
- enableCaptcha: boolean;
banned: boolean;
hdid: string;
resources: any;
@@ -186,7 +185,6 @@ class Client extends EventEmitter {
}
};
- this.enableCaptcha = false;
this.banned = false;
this.hp = [0, 0];
this.playerID = 1;
@@ -258,12 +256,6 @@ class Client extends EventEmitter {
*/
joinServer() {
this.sender.sendServer(`HI#${hdid}#%`);
- if (this.enableCaptcha && localStorage.getItem("hdid") !== hdid) {
- this.sender.sendServer(localStorage.getItem("hdid"));
- document.getElementById("client_secondfactor").style.display = "block";
- document.getElementById("client_charselect").remove();
- document.getElementById("client_ooc").remove();
- }
}
/**
diff --git a/webAO/dom/twofactor.ts b/webAO/dom/twofactor.ts
deleted file mode 100644
index 4f5fa81..0000000
--- a/webAO/dom/twofactor.ts
+++ /dev/null
@@ -1,9 +0,0 @@
-import { client } from "../client";
-
-export function hcallback(hcaptcharesponse: string) {
- localStorage.setItem("hdid", client.hdid);
- client.sender.sendServer(`2T#${hcaptcharesponse}#%`);
- location.reload();
-}
-
-window.hcallback = hcallback;
diff --git a/webAO/dom/window.ts b/webAO/dom/window.ts
index ac43a0a..6fbbf14 100644
--- a/webAO/dom/window.ts
+++ b/webAO/dom/window.ts
@@ -55,7 +55,6 @@ declare global {
onOOCEnter: (_event: any) => void;
kickPlayer: (id: number) => void;
banPlayer: (id: number) => void;
- hcallback: (_event: any) => void;
}
}
export {};