mirror of
https://github.com/tribufu/node-gamedig
synced 2026-05-18 09:35:50 +00:00
Super epic commit 2
Added pretty much every game ever Tons of new protocols and game definitions Cleaned up and discovered some new tricks in gamespy3 and quake2
This commit is contained in:
parent
b51877ef5c
commit
e23aa6cf9c
21 changed files with 854 additions and 222 deletions
|
|
@ -16,7 +16,7 @@ module.exports = require('./core').extend({
|
|||
state.raw = data;
|
||||
if('hostname' in state.raw) state.name = state.raw.hostname;
|
||||
if('mapname' in state.raw) state.map = state.raw.mapname;
|
||||
if(state.raw.password == '1') state.password = true;
|
||||
if(self.trueTest(state.raw.password)) state.password = true;
|
||||
if('maxplayers' in state.raw) state.maxplayers = parseInt(state.raw.maxplayers);
|
||||
c();
|
||||
});
|
||||
|
|
@ -42,7 +42,7 @@ module.exports = require('./core').extend({
|
|||
} else {
|
||||
if(!(id in players)) players[id] = {};
|
||||
if(key == 'playername') key = 'name';
|
||||
else if(key == 'team') value = parseInt(value)-1;
|
||||
else if(key == 'team') value = parseInt(value);
|
||||
else if(key == 'score' || key == 'ping' || key == 'deaths') value = parseInt(value);
|
||||
players[id][key] = value;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue