SnBans v1.8.2
Fixed
Cross-server sync delivered nothing when two backends shared a server-name.
The punishment feed told a peer's row from its own by comparing the row's server
column against server-name. That value is an owner-typed display string that ships
as "Server" in every jar, and the ordinary way to deploy a network - copy the plugin
folder to each backend - leaves it identical on all of them. Every peer's row then read
as locally issued, and the feed skipped all of it:
- a punishment announced only on the server the command was run on;
- a mute not enforced anywhere else, so the player kept talking on the other backend
until they reconnected and the login gate read the table itself; - a remote
/unmutethat did not free anyone either.
Nothing was logged, on either side.
A row is now recognised by its id, recorded inside the insert's own transaction so
the feed cannot read a row this install wrote before its id is known. This is exact on a
network whose backends all still call themselves Server, and needs no configuration
change to take effect.
server-name still has to be unique - network presence and the /helpop and /report
feeds are keyed by it and have no id to fall back on - so a duplicate is now reported
instead of being silent:
- a throttled console warning the first time SnBans reads a punishment written by another
install using its own name, naming what is broken and how to fix it; - a boot warning while
server-nameis still the shipped default on a shared database.
Also in this release:
- Reverts now lift the local mute cache unconditionally, this server's own included -
idempotent, and what keeps a remote/unmuteworking while the name cannot be trusted.
The API notification stays behind the name check, being the half that is not idempotent. - The LiteBans import declares its id range to the registry: its bulk insert has no
generated keys, and without that window the import would have announced another
network's entire ban history to everyone online.
No configuration change is required, and no config key was added or renamed. The
server-name comment in config.yml was rewritten and SnLib merges it on boot.
Installation
Download the JAR below and place in your plugins folder. Requires SnLib.jar.