Skip to content

Conversation

@ArranTuna
Copy link
Collaborator

Only throw an error once per second to prevent flooding from clients triggering non-added server side events.

Only throw an error once per second to prevent flooding.
@Fernando-A-Rocha
Copy link
Contributor

Servers should auto-punish a client when they trigger an invalid event (with https://wiki.multitheftauto.com/wiki/OnPlayerTriggerInvalidEvent) so they don't spam at all.
But considering that some servers might not still be doing this, it's probably a good idea to rate-limit the errors thrown on the sever 👍🏼

@ArranTuna
Copy link
Collaborator Author

ArranTuna commented Sep 15, 2025

I use that event, but sometimes auto-punish doesn't work and I won't say more on that as it shouldn't be discussed publicly. But this limit will help when auto-punish doesn't work, but also this is good for scripters, say if you've got 100 players on a server and your server side script failed to load, or you forgot to add an event, you could be getting spammed with so many of these errors that you didn't get a chance to see the initial load failure and it's quite a stressful experience. Also onPlayerTriggerInvalidEvent is bad in that case as you could end up auto-punishing innocent players due to a scripting mistake.

@Fernando-A-Rocha
Copy link
Contributor

Ok you made valid points. Hundreds of players could trigger the error at the same time.

👍🏼

@FileEX FileEX added the enhancement New feature or request label Sep 16, 2025
@Dutchman101 Dutchman101 merged commit 775d6dd into multitheftauto:master Sep 18, 2025
6 of 7 checks passed
MTABot pushed a commit that referenced this pull request Sep 18, 2025
@botder botder added this to the 1.7.1 milestone Sep 26, 2025
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

Successfully merging this pull request may close these issues.

5 participants