import: mod-tools batch (4 plugins, etc_NewPasswords v3.1.x adapt)#3
Merged
Conversation
Imports four mod / admin-tool plugins from upstream luadch/scripts. Each plugin in its own subdirectory with the hub-mirror layout (scripts/<plugin>/<plugin>.lua + lang/ + data/ where applicable). - cmd_mainclear (v0.02 german): clears main chat by sending blank lines. - cmd_pm2offliners (v0.8 multi3): send PM to offline users; receives delivery confirmation when they next log in. Lang en/de/sv. Three upstream open issues touch this script (#29 delivery bug, #30 minlevel/oplevel settings, #41 settings location); deliberately not fixed in this PR per the import-first discipline. - etc_levelcheck (v0.1 english): reports caller's user level via PM. Tiny debug/admin tool. - etc_NewPasswords (v0.4 multi3): generates new auto-password on next login for ineligible users; disconnects them with the new password in the kick message. Lang en/de/sv. v3.1.x adapt (this fork): the upstream mutated registered-user passwords by util.loadtable("cfg/user.tbl") + util.savearray() + hub.reloadusers(), which is incompatible with the AES-256-GCM encrypted user.tbl introduced in luadch-ng v3.1.x (Phase 7f). Switched to the user-object API: target:setpassword(new_pw) for the password change path; hub.getregusers() for the onStart enumeration. Both go through cfg.saveusers() and the encrypted-save path transparently. The compat note is documented in the file's provenance header. Same audit pass as the chat & messaging batch (PR #1): zero hits for the Lua-5.4-incompatible patterns, BOMs stripped where upstream shipped them. Smoke harness against luadch-ng/luadch v3.1.1: 10 / 10 PASS with both the chat & messaging batch and this batch dropped into the install tree, including the "no script errors in log" gate. The etc_NewPasswords onStart runs against the live regusers table, so the v3.1.x adapt is exercised by the boot path.
This was referenced May 6, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Second import batch. Four mod / admin-tool plugins, each in its own subfolder per the layout that landed in #2.
Plugins in this PR
etc_NewPasswords v3.1.x adapt
The upstream pattern - `util.loadtable("cfg/user.tbl") + util.savearray()` - is incompatible with the AES-256-GCM encrypted `user.tbl` introduced in luadch-ng v3.1.x (Phase 7f). Direct read returns nil (Lua source parser sees ciphertext); direct write would destroy the encrypted file with plaintext.
Switched both touch-points to the proper hub API:
Compat note is documented in the file's provenance header so future maintainers know why this script diverges from the upstream version.
Audit
Test plan
Out of scope (deferred)