mirror of
https://github.com/tribufu/node-gamedig
synced 2026-06-01 09:42:41 +00:00
feat: strip Colors (#469)
This commit is contained in:
parent
0a3338320e
commit
5ae12dd494
11 changed files with 47 additions and 38 deletions
|
|
@ -49,7 +49,7 @@ export default class gamespy2 extends Core {
|
|||
if (state.raw.gamename === 'armygame') {
|
||||
const stripColor = (str) => {
|
||||
// uses unreal 2 color codes
|
||||
return str.replace(/\x1b...|[\x00-\x1a]/g, '')
|
||||
return this.options.stripColors ? str.replace(/\x1b...|[\x00-\x1a]/g, '') : str
|
||||
}
|
||||
state.name = stripColor(state.name)
|
||||
state.map = stripColor(state.map)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue