mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-18 01:30:39 +01:00
bc6b5c9225
Move everything around Add another 50 or so games *** 'port' option should now be CONNECT port, not query port *** add reference for many missing games
24 lines
618 B
JavaScript
24 lines
618 B
JavaScript
/*
|
|
module.exports = require('./valve').extend({
|
|
init: function() {
|
|
this._super();
|
|
}
|
|
});
|
|
*/
|
|
|
|
// supposedly, gamespy3 is the "official" query protocol for jcmp,
|
|
// but it's broken (requires useOnlySingleSplit), and doesn't include player names
|
|
module.exports = require('./gamespy3').extend({
|
|
init: function() {
|
|
this._super();
|
|
this.useOnlySingleSplit = true;
|
|
},
|
|
finalizeState: function(state) {
|
|
this._super(state);
|
|
if(!state.players.length && parseInt(state.raw.numplayers)) {
|
|
for(var i = 0; i < parseInt(state.raw.numplayers); i++) {
|
|
state.players.push({});
|
|
}
|
|
}
|
|
}
|
|
});
|