mirror of
https://github.com/Dahlgren/arma-server-web-admin.git
synced 2024-08-30 17:22:10 +00:00
Changed hardcoded type to gamedig to lookup correct type based on game
Fixes #4
This commit is contained in:
parent
38c1601b74
commit
fcd02b3ccd
@ -8,6 +8,15 @@ var ArmaServer = require('arma-server');
|
|||||||
var config = require('../config.js');
|
var config = require('../config.js');
|
||||||
|
|
||||||
var queryInterval = 5000;
|
var queryInterval = 5000;
|
||||||
|
var queryTypes = {
|
||||||
|
arma1: 'arma',
|
||||||
|
arma2: 'arma2',
|
||||||
|
arma2oa: 'arma2',
|
||||||
|
arma3: 'arma3',
|
||||||
|
cwa: 'operationflashpoint',
|
||||||
|
ofp: 'operationflashpoint',
|
||||||
|
ofpresistance: 'operationflashpoint',
|
||||||
|
};
|
||||||
|
|
||||||
var Server = function (path, type, options) {
|
var Server = function (path, type, options) {
|
||||||
this.path = path;
|
this.path = path;
|
||||||
@ -37,7 +46,7 @@ Server.prototype.queryStatus = function() {
|
|||||||
var self = this;
|
var self = this;
|
||||||
Gamedig.query(
|
Gamedig.query(
|
||||||
{
|
{
|
||||||
type: 'arma3',
|
type: queryTypes[config.game],
|
||||||
host: '127.0.0.1',
|
host: '127.0.0.1',
|
||||||
port: self.port,
|
port: self.port,
|
||||||
},
|
},
|
||||||
|
Loading…
Reference in New Issue
Block a user