MegaAntiCheat / client-backend

GNU General Public License v3.0
117 stars 24 forks source link

Reading and manipuation of `voice_ban.dt` for muting players #130

Open Bash-09 opened 5 months ago

Bash-09 commented 5 months ago

Reading the accounts stored in the file will allow the client to provide indications on which players are muted. Being able to modify the file to insert or remove accounts may offer the ability to mute players through the client, either manually through the UI or automatically as proposed in #129

Bash-09 commented 5 months ago

Does anybody know if changes to this file are reloaded at some point in-game while it's running? It would be good if we can get the game to reload the file, as we could offer functionality to mute/unmute players and bots in real time. If not, it could still be useful as a preemptive tool to mute a bunch of known bots beforehand and hopefully avoid earrape and visualize who is muted, although it may not be able to happen during a match.

megascatterbomb commented 5 months ago

The only time I've seen the file be written to is when the game is closed.

UnknownAMD commented 4 months ago

You can take a look at the tf2 source code it's available here on github.

lili7h commented 4 months ago

We know - This is not an entirely helpful comment, but thank you for commenting none-the-less.

We have used the source code in the past to dig into the demo recording internals. Source likes to use in-memory buffered readers and writers (as any performance focused program should...), and as such often persistant data isn't written until the buffers have to be flushed. This is most often when the game is closed.

Kacey2k commented 4 months ago

voice_ban.dt can only support up to 255 entries, so I would recommend avoiding automating the muting feature. I can +1 being able to see muted status in the UI though.