mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
crlf -> ln conversion
This commit is contained in:
parent
50d3ef20a0
commit
f1467c5a04
94 changed files with 11388 additions and 11388 deletions
|
|
@ -1,20 +1,20 @@
|
|||
module.exports = require('./gamespy2').extend({
|
||||
finalizeState: function(state) {
|
||||
this._super(state);
|
||||
state.name = this.stripColor(state.name);
|
||||
state.map = this.stripColor(state.map);
|
||||
for(var i in state.raw) {
|
||||
if(!(typeof state.raw[i] == 'string')) continue;
|
||||
state.raw[i] = this.stripColor(state.raw[i]);
|
||||
}
|
||||
for(var i = 0; i < state.players.length; i++) {
|
||||
var player = state.players[i];
|
||||
if(!('name' in player)) continue;
|
||||
player.name = this.stripColor(player.name);
|
||||
}
|
||||
},
|
||||
stripColor: function(str) {
|
||||
// uses unreal 2 color codes
|
||||
return str.replace(/\x1b...|[\x00-\x1a]/g,'');
|
||||
}
|
||||
});
|
||||
module.exports = require('./gamespy2').extend({
|
||||
finalizeState: function(state) {
|
||||
this._super(state);
|
||||
state.name = this.stripColor(state.name);
|
||||
state.map = this.stripColor(state.map);
|
||||
for(var i in state.raw) {
|
||||
if(!(typeof state.raw[i] == 'string')) continue;
|
||||
state.raw[i] = this.stripColor(state.raw[i]);
|
||||
}
|
||||
for(var i = 0; i < state.players.length; i++) {
|
||||
var player = state.players[i];
|
||||
if(!('name' in player)) continue;
|
||||
player.name = this.stripColor(player.name);
|
||||
}
|
||||
},
|
||||
stripColor: function(str) {
|
||||
// uses unreal 2 color codes
|
||||
return str.replace(/\x1b...|[\x00-\x1a]/g,'');
|
||||
}
|
||||
});
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue