Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Core - Strip colors universally across all engines, and add an option to disable #204

Closed
miguelsotobaez opened this issue Dec 30, 2020 · 4 comments · Fixed by #469 · May be fixed by hixio-mh/node-gamedig#10
Closed

Core - Strip colors universally across all engines, and add an option to disable #204

miguelsotobaez opened this issue Dec 30, 2020 · 4 comments · Fixed by #469 · May be fixed by hixio-mh/node-gamedig#10

Comments

@miguelsotobaez
Copy link

miguelsotobaez commented Dec 30, 2020

Only appear colors code like ^1 ^2 in Bot but not in players.

I really like if we can see color codes in player name too.

maxplayers: '32',
players: [ { frags: 0, ping: 23, name: "»A'den Skirata«" } ],
bots: [ { frags: 0, ping: 0, name: '^0SL^1.^0DrachaT' } ],

@miguelsotobaez miguelsotobaez changed the title Jedi Academy Nick Color Jedi Academy Player Name Color Dec 30, 2020
@mmorrisontx
Copy link
Member

Seems unlikely if the protocol isn't returning it already. Strange that it's showing for bots only. If you run the query with debug: true, does the response data contain any of the color codes? If not, there's not much we can do about it.

@miguelsotobaez
Copy link
Author

miguelsotobaez commented Jan 4, 2021

@mmorrisontx I found the issue, the problem is in the file quake3.js in protocols folder.

image

There is a string replace with some regexp to delete color format before the results.

I think I'm going to fork this repository and working for a fix. Maybe some parameter to allow or disallow color formats.
Or Maybe there's another better and clean solution for this.

I'm working on this because I'm working on a Ranking ELO Site for Jedi Academy based on Q3 Engine https://skirata.pro/#/japlus

Regards

@mmorrisontx
Copy link
Member

Ah, I didn't realize this was one of the protocols where we strip color codes. Seems like a bug that we treat players and bots differently :)

@mmorrisontx mmorrisontx changed the title Jedi Academy Player Name Color Core - Strip colors universally across all engines, and add an option to disable May 18, 2021
@podrivo
Copy link
Contributor

podrivo commented Jan 15, 2024

This seems something specific to Quake and has no other issues around this subject. Also, removing colors extra char from the object seems the correct approach. I guess this is safe to close.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants