Exiled-Team / DiscordIntegration

GNU General Public License v3.0
13 stars 37 forks source link

[SUGGESTION] Clean up player leave logging without disabling anything in the config. #69

Closed EsserGaming closed 2 years ago

EsserGaming commented 2 years ago

Screenshot 2021-10-09 003919 Example in the picture. I hope this is enough for a suggestion.

joker-119 commented 2 years ago

These events are called by the server when a player leaves because they happen when a player leaves, there is no way to determining if a player is leaving during an event call, the event just occurs, then the next, then the next, eventually leading up to the leaving event, it's not until the leaving event is fired that we have any possible way to know if the player is leaving, thus it would be impossible to "clean up" the events that happened before, since they were already sent to the bot.

To hold onto the events for a few seconds to wait and see if the player has left, would cause any server with more than 20 players to use a shit ton of RAM holding countless event logs in memory for very little reason.