11 Commits

Author SHA1 Message Date
Aaron Suen
d161b83a90 Increase GC intervals
We're already kicking off GC on startup, and it shouldn't be able
to get way out of hand within an hour, so we don't need to scan
quite so intensely.
2024-08-24 14:32:10 -04:00
Aaron Suen
f825b2e6cd Garbage collect removed players from mod_storage
There are a number of mods in the pack that store metadata about
players "inside out", in mod_storage instead of player:get_meta,
because player meta is not accessible when the player is not online
and that's necessary for some mods.  Player meta is also tied to
the "player character" and not to the auth account, so inside out
storage is necessary when we want data to survive resetting the
player character while keeping the account.

Unfortunately, this prevents MT from automatically cleaning up
the metadata when a player is destroyed, which can happen for
various reasons outside the control of the mod.  This can cause
keys to accumulate in the mod storage database, which may hurt
performance over time.

To keep things tidy, periodically scan the mod storage keys for
each such mod (add a scan cycle, or integrate with an existing
one) and automatically clean up old mod storage keys.

szutil_xplevel was already doing this on startup and command;
convert it to do periodic scans like the other mods.
2024-08-24 12:18:52 -04:00
Aaron Suen
1e5c07f81c Stop overusing "action" log level 2023-06-12 20:40:14 -04:00
Aaron Suen
2f3985f1d3 Permission to exempt players from MOTD 2022-04-21 23:40:29 -04:00
Aaron Suen
21638c35aa Add <phash> tag to motd/motdagree
Each server can now setup unique per-server
per-player hash keys for the "agree to MOTD"
step to ensure that players actually have to
open the MOTD and at least find their
personal key before they can agree.
2020-09-01 20:04:18 -04:00
Aaron Suen
e0768209c5 Add polling/alterting option for motd 2020-07-05 09:48:19 -04:00
Aaron Suen
a500038ad8 szutil_motd overhaul
- Use new 5.0+ actually-good read-only textarea.
- Use SHA1, mod storage.
- Simplify code, more dynamic, runtime-configurable.
2020-01-25 08:06:36 -05:00
Aaron Suen
d06edd2838 Fix deprecated methods, formatting. 2019-12-06 19:07:56 -05:00
Aaron Suen
8ee5a36fd2 Code audit, cleanup and reformat. 2019-09-01 12:52:22 -04:00
Aaron Suen
dee4bed813 Fix some deprecation warnings. 2019-03-27 22:10:19 -04:00
Aaron Suen
6c238b26a1 Revive szutilpack from updates from sztest and nodecore.
- Rename namespace to "top-level" szutil_*.
- Merge improvements from sztest.
- New utils: chatsock, consock, logtrace, usagesurvey.
- Lagometer/logtrace are chat-command-togglable.
2019-03-27 06:23:19 -04:00