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 } );