From 0eedef4f201945ae709028014d62aac8dd05b478 Mon Sep 17 00:00:00 2001 From: Hri7566 Date: Sun, 15 Sep 2024 21:22:41 -0400 Subject: [PATCH] stuff --- config/frontend.yml | 2 ++ src/ws/Socket.ts | 3 ++- src/ws/server.ts | 6 +++++- 3 files changed, 9 insertions(+), 2 deletions(-) diff --git a/config/frontend.yml b/config/frontend.yml index 4dedbe5..e589567 100644 --- a/config/frontend.yml +++ b/config/frontend.yml @@ -1 +1,3 @@ topButtons: none +disableChat: false +winter: false diff --git a/src/ws/Socket.ts b/src/ws/Socket.ts index 6342cab..eceb9de 100644 --- a/src/ws/Socket.ts +++ b/src/ws/Socket.ts @@ -391,7 +391,8 @@ export class Socket extends EventEmitter { let tag: Tag | undefined; try { - tag = JSON.parse(this.user.tag) as Tag; + if (typeof this.user.tag === "string") + tag = JSON.parse(this.user.tag) as Tag; } catch (err) {} return { diff --git a/src/ws/server.ts b/src/ws/server.ts index 2751611..40953dc 100644 --- a/src/ws/server.ts +++ b/src/ws/server.ts @@ -19,12 +19,16 @@ const httpIpCache = new Map(); interface IFrontendConfig { topButtons: "original" | "none"; + disableChat: boolean; + winter: boolean; } const config = ConfigManager.loadConfig( "config/frontend.yml", { - topButtons: "original" + topButtons: "original", + disableChat: false, + winter: false } );