Merge pull request #580 from lluiscab/patch-1

Fix autoVersion
This commit is contained in:
Romain Beaumont 2018-08-26 01:34:24 +02:00 committed by GitHub
commit e638bafd3a
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -10,7 +10,7 @@ module.exports = function (client, options) {
debug('pinging', options.host)
// TODO: use 0xfe ping instead for better compatibility/performance? https://github.com/deathcap/node-minecraft-ping
ping(options, function (err, response) {
if (err) { client.emit('error', err) }
if (err) { return client.emit('error', err) }
debug('ping response', response)
// TODO: could also use ping pre-connect to save description, type, max players, etc.
const motd = response.description