- Always pend a restart on player join, so empty servers are
always freshly restarted for optimal RAM conservation. This
would kill uptime/availability stats for a public server, but is
ideal for private server that are often empty, e.g. when running
multiple private servers on "standby" for a smaller pool of
local players.
- Improve logging of restart triggers.
- Don't announce restarts extremely far into the future, so that
the "pend restart on join" feature doesn't cause undue chat
noise and scare players away who habitually quit to restart upon
seeing a "restart in..." message.
Waypoints can be added/removed via chat
commands. This makes it easier to adapt to
various "points of interest" that may evolve over
time with the world.
Finally mod_storage is actually efficient enough,
when using sqlite3, to ditch the old file-based
storage, which is a nightmare for backups. This
mod now effectively requires that sqlite3-based
mod storage be used for worlds of sufficient
scale, but that's probably a fair requirement for
using this rather obscure mod anyway.
By default, players joining the server who are
configured to act as cinematic cameras only
should not see the server status message ...
unless specifically configured to see it.
We actually want to prune accounts based on the
last time they were used or seen online at all, not
just the last time they successfully joined the
world. Keeping track of our own timestamp should
catch scenarios like players sucessfully authing
but failing to complete joining the world, or players
who log in and then play for a long time after
login. This also makes it safer to use with much
shorter timeout periods and longer-running
servers.
Further tighten the race condition gap between
players authing and finishing joining. The
meaning of last_login is apparently officially the
last join time, but if the last successful auth time
was later, use that as the known account age.
It's possible for a player to log in right as the
check scan is happening, causing the decision to
delete the account happening, then the player
successfully authing, then the account being
actually deleted from the queue, and then the
player completing emerge and running joinplayer
callbacks. One of the joinplayer callbacks tries to
update the last_login, which fails if the account
was deleted while the player was emerging.
Rather than redo the checks, just perform all the
deletion stuff inline.
pruneplayers can race with other mods (e.g.
motdagree) to delete a player. If the player was
already deleted when the check runs, don't crash,
just skip the player this pass.
- In some cases, players are not being kicked, even though their
status clearly indicates they should be. Make sure the "should we
kick them" logic in the status check command matches the logic in
the thing that actually does the kick.
- Clean up the way we handle event hooks to reduce the code mess.
- Don't rely on the bump/bumpn functions returning pname; always
return nil with them and determine pname at the outer layers and
pass it in as necessary. This is how we should have fixed the
earlier bug that caused players digging things not to get the node.
Things like auto-forward or a taped down mining key also count
as "idle" for this system's purposes as well, to avoid players
trivially exploiting to avoid being kicked, or to prevent
false positives caused by stuck controls.
Instead of using mod_storage and privs to control
cinecam, just use settings. The priv checks every
globalstep per player, in particular, were expensive,
and using "/grantme all" with the mod installed
would cause the player to teleport as a camera
player.
- Check destination medium against source, since it's possible
to transition from a fluid to air and raycast will NOT collide
with the air, causing from-fluid-to-air transitions not to be
detected.
- Pre-cache fluid medium data for all node defs instead of running
through logic at runtime.
Deeper dimming/vignette when server is empty
to make it a little more visually interesting, plus
add a clearer indication that the server is in
a different state than normal play.