Applies to:DM Language
Status: Open

Issue hasn't been assigned a status value.
A way to store information on clients and the world that survives a world reboot but not DreamDeamon being shutdown and started back up.

This comes up every so often where implimenting something would be easier if we could differentiate connecting clients (in client/New()) from "fake" connects from world/Reboot() as well as differentiate in world/New() fresh starts and restarts.

I got the idea to just store information about them in a var because 90% of the time, the differentiating would just be used to control the persistence of state, so directly implimenting a way to store that state made sense.

/tg/ examples:
  • Longer lobby count down on fresh starts to give better time to seed the server before the round starts.
  • Reducing the amount of information required to be checked about clients "connecting" from restart since they were already validated (This is a non-trivial thing to do at world restart with 60 to 120 connecting clients):
    • Bans
    • Proxy checks
    • 'tgplayer' database entry in mysql database
    • alt account search by ip/cid

Attempting to guestimate this ourselves via time tracking at reboot and New might technically work, but for world/New() such a trick is the definition of a race condition, and for client/New() i can't risk skipping verifications based on time since last reboot because that becomes an exploit a banned player or proxied ban evader could use to avoid detection.

I'll likely end up implementing some of this at /tg/ using some time since reboot saved to a json file based hacks but a more proper way that isn't technically a race condition would be very nice.