aboutsummaryrefslogtreecommitdiff
path: root/webAO/client.ts
diff options
context:
space:
mode:
authorstonedDiscord <Tukz@gmx.de>2022-07-16 15:08:05 +0200
committerstonedDiscord <Tukz@gmx.de>2022-07-16 15:08:05 +0200
commitf7a94ed001f600994d4dbcd221463e2d77fca59d (patch)
treebee40cab57c7265b0f750e9cdfd1dff59b5384a1 /webAO/client.ts
parentb60b656fceee55f689de2bdb30a86b7fd42e6810 (diff)
hopefully fix banned message
Diffstat (limited to 'webAO/client.ts')
-rw-r--r--webAO/client.ts10
1 files changed, 4 insertions, 6 deletions
diff --git a/webAO/client.ts b/webAO/client.ts
index 246d496..7696047 100644
--- a/webAO/client.ts
+++ b/webAO/client.ts
@@ -71,7 +71,7 @@ let selectedMenu = 1;
let selectedShout = 0;
let extrafeatures: string[] = [];
-
+let banned: boolean = false;
let hdid: string;
declare global {
@@ -212,8 +212,6 @@ class Client extends EventEmitter {
this.callwords = [];
- this.banned = false;
-
this.resources = getResources(AO_HOST, THEME);
this.selectedEmote = -1;
@@ -591,7 +589,7 @@ class Client extends EventEmitter {
*/
onClose(e: CloseEvent) {
console.error(`The connection was closed: ${e.reason} (${e.code})`);
- if (extrafeatures.length == 0 && this.banned === false) {
+ if (extrafeatures.length == 0 && banned === false) {
document.getElementById('client_errortext').textContent = 'Could not connect to the server';
}
document.getElementById('client_waiting').style.display = 'block';
@@ -1353,7 +1351,7 @@ class Client extends EventEmitter {
*/
handleKB(args: string[]) {
this.handleBans('Banned', safeTags(args[1]));
- this.banned = true;
+ banned = true;
}
/**
@@ -1372,7 +1370,7 @@ class Client extends EventEmitter {
*/
handleBD(args: string[]) {
this.handleBans('Banned', safeTags(args[1]));
- this.banned = true;
+ banned = true;
}
/**