-
Notifications
You must be signed in to change notification settings - Fork 0
Storage
EconGuard keeps the unified ledger and the flag list in a single SQLite file:
plugins/EconGuard/econguard.db
The file name is set by database.file in config. Two logical tables: the money ledger (every reported MoneyEvent) and the flags list.
You may also see econguard.db-wal and econguard.db-shm alongside it — SQLite's write-ahead log and shared-memory files. They're normal; don't delete them while the server is running.
The ledger is bounded by database.max-rows-per-player:
- Only the newest N rows per player are kept.
- Older rows are pruned on startup.
- Set it to
0for unlimited retention.
This keeps the ledger from growing without bound on a long-lived server. If you want a deep audit trail, raise the number; if you only care about recent behaviour (which is what the detection windows use anyway), the default of 500 is plenty.
Trade-off:
max-rows-per-playercaps history depth, not detection. The signals work over short rolling windows (minutes), so a low cap doesn't blind them — it only shortens how far back/eg historycan look.
Writes are asynchronous, off the main thread, so recording an event never blocks gameplay. Recording is fire-and-forget from a reporting plugin's point of view — it hands EconGuard a MoneyEvent and returns immediately.
EconGuard doesn't ship a backup command (the ledger is analysis data, not authoritative balances — the money itself lives in your economy plugin and RoyalBank). If you want to keep the audit trail, copy econguard.db while the server is stopped, or use a plugin/OS-level job that snapshots the file. Don't copy the live .db while the server is running, as the WAL may be mid-write.
To wipe the ledger and flags entirely, stop the server and delete econguard.db (and its -wal/-shm siblings). A fresh one is created on next start. To clear only flags without touching the ledger, use /eg flags clear instead.
EconGuard · part of the eco suite (RoyalBank · RoyalAuctions · RoyalBazaar) · Source on GitHub
Getting started
Using it
Developers
Help