mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-28 05:35:56 -04:00
"hash" varible moved inside joinServerRequest function
This commit is contained in:
parent
bcef115c07
commit
ab0237e5e6
5
index.js
5
index.js
@ -261,9 +261,6 @@ function createClient(options) {
|
|||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
||||||
var hash = crypto.createHash('sha1');
|
|
||||||
hash.update(packet.serverId);
|
|
||||||
|
|
||||||
if (haveCredentials) {
|
if (haveCredentials) {
|
||||||
joinServerRequest(onJoinServerResponse);
|
joinServerRequest(onJoinServerResponse);
|
||||||
} else {
|
} else {
|
||||||
@ -283,6 +280,8 @@ function createClient(options) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function joinServerRequest(cb) {
|
function joinServerRequest(cb) {
|
||||||
|
var hash = crypto.createHash('sha1');
|
||||||
|
hash.update(packet.serverId);
|
||||||
hash.update(sharedSecret);
|
hash.update(sharedSecret);
|
||||||
hash.update(packet.publicKey);
|
hash.update(packet.publicKey);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user