Minor cleanup to satisfy code inspection
This commit is contained in:
parent
20b012ba80
commit
c0548fb886
|
@ -16,7 +16,7 @@ npm install gamedig
|
||||||
|
|
||||||
Promise:
|
Promise:
|
||||||
```javascript
|
```javascript
|
||||||
var Gamedig = require('gamedig');
|
const Gamedig = require('gamedig');
|
||||||
Gamedig.query({
|
Gamedig.query({
|
||||||
type: 'minecraft',
|
type: 'minecraft',
|
||||||
host: 'mc.example.com'
|
host: 'mc.example.com'
|
||||||
|
@ -29,7 +29,7 @@ Gamedig.query({
|
||||||
|
|
||||||
or Node.JS Callback:
|
or Node.JS Callback:
|
||||||
```javascript
|
```javascript
|
||||||
var Gamedig = require('gamedig');
|
const Gamedig = require('gamedig');
|
||||||
Gamedig.query({
|
Gamedig.query({
|
||||||
type: 'minecraft',
|
type: 'minecraft',
|
||||||
host: 'mc.example.com'
|
host: 'mc.example.com'
|
||||||
|
|
|
@ -14,7 +14,7 @@ function parseList(str) {
|
||||||
|
|
||||||
if(value === 'true' || value === '') value = true;
|
if(value === 'true' || value === '') value = true;
|
||||||
else if(value === 'false') value = false;
|
else if(value === 'false') value = false;
|
||||||
else if(!isNaN(value)) value = parseInt(value);
|
else if(!isNaN(parseInt(value))) value = parseInt(value);
|
||||||
|
|
||||||
out[key] = value;
|
out[key] = value;
|
||||||
}
|
}
|
||||||
|
|
|
@ -4,6 +4,7 @@ class Battlefield extends require('./core') {
|
||||||
constructor() {
|
constructor() {
|
||||||
super();
|
super();
|
||||||
this.encoding = 'latin1';
|
this.encoding = 'latin1';
|
||||||
|
this.isBadCompany2 = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
run(state) {
|
run(state) {
|
||||||
|
|
|
@ -17,6 +17,7 @@ class Core extends EventEmitter {
|
||||||
this.encoding = 'utf8';
|
this.encoding = 'utf8';
|
||||||
this.byteorder = 'le';
|
this.byteorder = 'le';
|
||||||
this.delimiter = '\0';
|
this.delimiter = '\0';
|
||||||
|
this.srvRecord = null;
|
||||||
|
|
||||||
this.globalTimeoutTimer = setTimeout(() => {
|
this.globalTimeoutTimer = setTimeout(() => {
|
||||||
this.fatal('timeout');
|
this.fatal('timeout');
|
||||||
|
|
Loading…
Reference in New Issue