Took a tip from lax1dude.

This commit is contained in:
FloppyMacguffum 2024-11-28 10:46:18 -08:00
parent c38227b2fe
commit c0bf9b3254

View File

@ -189,7 +189,7 @@ export class Proxy extends EventEmitter {
}
}, this.LOGIN_TIMEOUT);
try {
if (firstPacket.toString().toLowerCase() === "accept: motd") {
if (new RegExp("accept: motd", "i").test(firstPacket.toString())) {
if (!this.ratelimit.motd.consume(req.socket.remoteAddress).success) {
return ws.close();
}