mirror of
https://github.com/WorldEditAxe/eaglerproxy.git
synced 2024-12-22 15:24:12 -08:00
Compare commits
1 Commits
56a186aa39
...
af0a814375
Author | SHA1 | Date | |
---|---|---|---|
|
af0a814375 |
|
@ -30,7 +30,6 @@ import { SkinServer } from "./skins/SkinServer.js";
|
|||
|
||||
let instanceCount = 0;
|
||||
const chalk = new Chalk({ level: 2 });
|
||||
const motdMatcher = /accept: motd/i;
|
||||
|
||||
export class Proxy extends EventEmitter {
|
||||
public packetRegistry: Map<
|
||||
|
@ -190,7 +189,7 @@ export class Proxy extends EventEmitter {
|
|||
}
|
||||
}, this.LOGIN_TIMEOUT);
|
||||
try {
|
||||
if (motdMatcher.test(firstPacket.toString())) {
|
||||
if (new RegExp("accept: motd", "i").test(firstPacket.toString())) {
|
||||
if (!this.ratelimit.motd.consume(req.socket.remoteAddress).success) {
|
||||
return ws.close();
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user