nomns / nparse

Nomns' Parser for Project1999
GNU General Public License v3.0
43 stars 23 forks source link

Fix for leaky waypoints and empty playernames #85

Closed token419 closed 2 months ago

token419 commented 2 months ago

The change in clean_old_waypoints should address most of your data leakage issues. Any waypoints that were created were cleaned up, but the zones never got cleaned up, leading to the json emitted on every message to grow any time a new zone got a waypoint for the first time. Added logic to cleanup the waypoints based on the remove player logic.

Also while discovering/fixing this issue, I noticed if you used a blank character name for emitting data that the data would not pass the disconnect if player check, so I updated it to check if the player string was empty as well since the if statement was failing on an empty string. Prior to the fix, the player's data was left in the zone after disconnect and was never cleaned up as well.