This commit is contained in:
Soph :3 2024-05-03 20:29:22 +03:00
parent a83abf598d
commit c72b2c494e
Signed by: sophie
GPG key ID: EDA5D222A0C270F2
2 changed files with 9 additions and 2 deletions

View file

@ -46,7 +46,8 @@ export class Server {
} else {
socket.data.dataBuffer = data;
}
log.debug("Socket", socket.remoteAddress, "has", socket.data.dataBuffer.length, "data for parsing.");
const parseBuffer = () => {
if(!socket.data.dataBuffer) return;

View file

@ -9,6 +9,11 @@ export const log = {
},
critical: (...a) => {
console.error("[ERROR]", ...a);
},
debug: (...a) => {
if(config.debug) {
console.log("[DEBUG]", ...a)
}
}
}
export const config = {
@ -19,5 +24,6 @@ export const config = {
main: process.env.MAIN || "main",
maxUsers: +(process.env.USERS || 24) > 255 ? 255 : +(process.env.USERS || 24),
software: process.env.SOFTWARE || "Custom Cla66ic",
name: process.env.NAME || "Cla66ic Server"
name: process.env.NAME || "Cla66ic Server",
debug: process.env.DEBUG == "true",
};