mirror of
https://github.com/gamedig/node-gamedig.git
synced 2024-11-18 09:40:38 +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
19 lines
527 B
JavaScript
19 lines
527 B
JavaScript
module.exports = require('./quake2').extend({
|
|
init: function() {
|
|
this._super();
|
|
this.sendHeader = 'getstatus';
|
|
this.responseHeader = 'statusResponse';
|
|
},
|
|
finalizeState: function(state) {
|
|
state.name = this.stripColors(state.name);
|
|
for(var i in state.raw) {
|
|
state.raw[i] = this.stripColors(state.raw[i]);
|
|
}
|
|
for(var i = 0; i < state.players.length; i++) {
|
|
state.players[i].name = this.stripColors(state.players[i].name);
|
|
}
|
|
},
|
|
stripColors: function(str) {
|
|
return str.replace(/\^(X.{6}|.)/g,'');
|
|
}
|
|
});
|