mirror of
https://github.com/PrismarineJS/node-minecraft-protocol.git
synced 2025-06-13 13:40:33 -04:00
"hash" varible moved inside joinServerRequest function
This commit is contained in:
parent
bcef115c07
commit
ab0237e5e6
1 changed files with 2 additions and 3 deletions
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…
Add table
Add a link
Reference in a new issue