mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 05:35:56 -04:00
Kick client when he is using the wrong version of the client, fix #209
This commit is contained in:
parent
f7e50721e8
commit
fdc24cbeed
@ -114,7 +114,7 @@ class Client extends EventEmitter
|
||||
|
||||
end(reason) {
|
||||
this._endReason = reason;
|
||||
this.socket.end();
|
||||
if(this.socket) this.socket.end();
|
||||
}
|
||||
|
||||
setEncryption(sharedSecret) {
|
||||
|
@ -146,6 +146,10 @@ function createServer(options) {
|
||||
} else if(packet.nextState == 2) {
|
||||
client.state = states.LOGIN;
|
||||
}
|
||||
if(client.protocolVersion!=version.version)
|
||||
{
|
||||
client.end("Wrong protocol version, expected : "+version.version+" and you are using : "+client.protocolVersion);
|
||||
}
|
||||
}
|
||||
|
||||
function onEncryptionKeyResponse(packet) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user