mirror of
https://github.com/unmojang/node-minecraft-protocol.git
synced 2025-09-27 21:24:25 -04:00
packet 0xfe (ping): some fields renamed, put the correct protocol version in mc.ping()
This commit is contained in:
parent
f3657f74e0
commit
ae2046d991
@ -1,5 +1,6 @@
|
||||
var net = require('net')
|
||||
, Client = require('./client')
|
||||
, protocol = require('./protocol')
|
||||
|
||||
module.exports = ping;
|
||||
|
||||
@ -34,11 +35,11 @@ function ping(options, cb) {
|
||||
});
|
||||
client.on('connect', function() {
|
||||
client.write(0xfe, {
|
||||
unused1: 1,
|
||||
readSuccessfully: 1,
|
||||
customPayloadId: 250,
|
||||
magicText: "MC|PingHost",
|
||||
len: 3 + host.length + 4,
|
||||
magic: 73,
|
||||
version: protocol.version,
|
||||
ip: host,
|
||||
port: port,
|
||||
});
|
||||
|
@ -480,11 +480,11 @@ var packets = {
|
||||
{ name: "verifyToken", type: "byteArray16" }
|
||||
],
|
||||
0xfe: [
|
||||
{ name: "unused1", type: "byte" },
|
||||
{ name: "readSuccessfully", type: "byte" },
|
||||
{ name: "customPayloadId", type: "ubyte" },
|
||||
{ name: "magicText", type: "string" },
|
||||
{ name: "len", type: "short" },
|
||||
{ name: "magic", type: "byte" },
|
||||
{ name: "version", type: "byte" },
|
||||
{ name: "ip", type: "string" },
|
||||
{ name: "port", type: "int" }
|
||||
],
|
||||
|
Loading…
x
Reference in New Issue
Block a user