add captcha support

This commit is contained in:
elijahr2411
2023-02-10 08:52:52 -05:00
parent 82cbcc030e
commit 626d32d22b
6 changed files with 66 additions and 1 deletions

View File

@@ -18,6 +18,7 @@ export class User {
Config : IConfig;
IP : string;
vote : boolean | null;
captchaValidated : boolean;
// Rate limiters
ChatRateLimit : RateLimiter;
LoginRateLimit : RateLimiter;
@@ -52,6 +53,7 @@ export class User {
this.LoginRateLimit.on('limit', () => this.closeConnection());
this.TurnRateLimit = new RateLimiter(5, 3);
this.TurnRateLimit.on('limit', () => this.closeConnection());
this.captchaValidated = false;
}
assignGuestName(existingUsers : string[]) : string {
var username;