Add motd to hi message

This commit is contained in:
Hri7566 2024-07-30 07:46:56 -04:00
parent ec16301ae3
commit 008d38f5ff
2 changed files with 6 additions and 4 deletions

View File

@ -34,4 +34,4 @@ tokenAuth: none
# "none" will disable the browser challenge,
# "obf" will sent an obfuscated function to the client,
# and "basic" will just send a simple function that expects a boolean.
browserChallenge: basic
browserChallenge: none

View File

@ -1,4 +1,5 @@
import { Logger } from "../../../../util/Logger";
import { getMOTD } from "../../../../util/motd";
import { generateToken, verifyToken } from "../../../../util/token";
import { ClientEvents, ServerEventListener } from "../../../../util/types";
import { config } from "../../../usersConfig";
@ -70,10 +71,11 @@ export const hi: ServerEventListener<"hi"> = {
color: part.color,
name: part.name
},
token: generatedToken
}
token: generatedToken,
motd: getMOTD()
};
logger.debug("Hi message:", m);
//logger.debug("Hi message:", m);
socket.sendArray([m as ClientEvents["hi"]]);