mirror of
https://github.com/Tribufu/node-gamedig
synced 2026-08-10 15:41:04 +00:00
Add eslint (#364)
* Add initial prettier and eslint configs * Modify prettierrc * Run eslint on everything * Actually remove prettier * Fix some eslints * Remove label in gs2 * Update CHANGELOG * Update eslintrc to specify es2021
This commit is contained in:
parent
bff9507189
commit
93a9095d99
67 changed files with 6960 additions and 5211 deletions
|
|
@ -1,18 +1,19 @@
|
|||
import gamespy3 from './gamespy3.js';
|
||||
|
||||
// supposedly, gamespy3 is the "official" query protocol for jcmp,
|
||||
// but it's broken (requires useOnlySingleSplit), and may not include some player names
|
||||
export default class jc2mp extends gamespy3 {
|
||||
constructor() {
|
||||
super();
|
||||
this.useOnlySingleSplit = true;
|
||||
this.isJc2mp = true;
|
||||
this.encoding = 'utf8';
|
||||
}
|
||||
async run(state) {
|
||||
await super.run(state);
|
||||
if(!state.players.length && parseInt(state.raw.numplayers)) {
|
||||
state.players.setNum(parseInt(state.raw.numplayers));
|
||||
}
|
||||
}
|
||||
}
|
||||
import gamespy3 from './gamespy3.js'
|
||||
|
||||
// supposedly, gamespy3 is the "official" query protocol for jcmp,
|
||||
// but it's broken (requires useOnlySingleSplit), and may not include some player names
|
||||
export default class jc2mp extends gamespy3 {
|
||||
constructor () {
|
||||
super()
|
||||
this.useOnlySingleSplit = true
|
||||
this.isJc2mp = true
|
||||
this.encoding = 'utf8'
|
||||
}
|
||||
|
||||
async run (state) {
|
||||
await super.run(state)
|
||||
if (!state.players.length && parseInt(state.raw.numplayers)) {
|
||||
state.players.setNum(parseInt(state.raw.numplayers))
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue