- 
 
- 
  Notifications
 You must be signed in to change notification settings 
- Fork 496
Limit non-added event logging (#4466) #4467
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
Limit non-added event logging (#4466) #4467
Conversation
Only throw an error once per second to prevent flooding.
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 👍🏼
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.
Ok you made valid points. Hundreds of players could trigger the error at the same time.
👍🏼
775d6dd
 into
 
 
 multitheftauto:master
 
 
Only throw an error once per second to prevent flooding from clients triggering non-added server side events.