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

Feature Request: Log usernames of all players, not only those marked as cheaters #99

Open
Seercat3160 opened this issue Jan 8, 2024 · 9 comments
Labels
enhancement New feature or request

Comments

@Seercat3160
Copy link
Contributor

If we're already locally logging the seen usernames of players marked as cheaters, why not record all other players too, or at least make it an option? It would make identifying certain players easier, and better allow keeping an eye on suspicious or disruptive players.

If this is already done on the backend, it should be exposed to the frontend for all players. Let me know and I'll make the issue there instead.

@Bash-09
Copy link
Contributor

Bash-09 commented Jan 8, 2024

If a player has any info stored (e.g. a note attached, a custom alias, or a non-Player verdict like Cheater, Trusted, etc), their usernames will be logged when they change already. I personally think this is a preferable default, as logging usernames of all players will store a bunch of information that will likely never be needed and bloat the playerlist, although I don't object to this being added as feature (defaulting to off) if a user actually wants it.

If it's just the ability to track a particular player without the user having to add a note or alias or anything, I think that is more of a frontend concern. e.g. there could be an option to click on a user and start tracking them, and some variable is added to the custom data which will make the backend begin tracking.

@Seercat3160
Copy link
Contributor Author

I was thinking it more like the first way, and I completely agree with the current behaviour being the default. I think, though, that there should be an option (default disabled) to log names of all players encountered, maybe with a warning in the UI that it will "store a bunch of information that will likely never be needed and bloat the playerlist" as you said. Personally, I would like to have that as I have plenty of disk space and think it's worth it.

@lili7h
Copy link
Contributor

lili7h commented Jan 8, 2024

my suggestion was that since we load the whole file into memory when running the app anyway, we could gzip level 9 compress the history file on disk so as to save as much space as possible, since ya know, json isnt very space efficient but usually compresses pretty well
no idea if anyone wants to go for that though

@megascatterbomb
Copy link
Contributor

my suggestion was that since we load the whole file into memory when running the app anyway, we could gzip level 9 compress the history file on disk so as to save as much space as possible, since ya know, json isnt very space efficient but usually compresses pretty well no idea if anyone wants to go for that though

If we compress the entire playerlist we need a method for graceful termination of the client; interrupting the compression half-way would most likely corrupt the user's playerlist.

@DireHydrant
Copy link

Is there a specific reason to be using JSON other than the files being human readable? If you're planning on using the web app to view everything, you could switch to a binary serialization/de-serialization since the client is already using serde.

Still, recording all player's usernames would definitely bloat the filesize quite a bit, but it would also allow us to see how often we've queued into games with the same people, which could be fun.

@Bash-09
Copy link
Contributor

Bash-09 commented Jan 20, 2024

@DireHydrant

No specific reason, just that JSON is human-readable and easy for other people to use.

We very well could switch to a binary format for main persistence and provide some way (maybe args when running the program) to convert to/from or otherwise manipulate different formats (MAC-binary, MAC-json, TF2BD, etc).

@DireHydrant
Copy link

I definitely see the value in having a human readable file, but I don't think that many users are going to be interacting and editing the files by hand (although maybe there is a case I'm not considering). Either way, there's already an existing JSON import function that takes in a playerlist.json, so adding an arg or a button in the UI to export as a json would definitely work as an alternative.

@Bash-09
Copy link
Contributor

Bash-09 commented Jan 20, 2024

but I don't think that many users are going to be interacting and editing the files by hand

Yeah that's definitely not the common case. It was mainly convenient while still developing stuff but really isn't very important anymore.

I would be perfectly happy for the storage medium to change format. I would just want to make sure that the functionality for converting to/from Json be exposed at the same time so it's still possible for people to make e.g. a python script to scrape data from somewhere to make a playerlist.

@Bash-09 Bash-09 added the enhancement New feature or request label Jan 29, 2024
@NiXTheDev
Copy link

my suggestion was that since we load the whole file into memory when running the app anyway, we could gzip level 9 compress the history file on disk so as to save as much space as possible, since ya know, json isnt very space efficient but usually compresses pretty well no idea if anyone wants to go for that though

If we compress the entire playerlist we need a method for graceful termination of the client; interrupting the compression half-way would most likely corrupt the user's playerlist.

Possible solutions:

  1. Put it in another thread?
  2. Player list file versioning?

Cons to the solutions:

  1. The thread could hang(memory leak?)
  2. Hard to manage(?)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

6 participants