Minor cleanup to satisfy code inspection

This commit is contained in:
mmorrison 2017-08-09 05:41:30 -05:00
parent 20b012ba80
commit c0548fb886
4 changed files with 5 additions and 3 deletions

View File

@ -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'

View File

@ -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;
} }

View File

@ -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) {

View File

@ -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');