Skip to content

import: filter & blocking batch (8 plugins)#4

Merged
Aybook merged 1 commit into
masterfrom
import/filter-and-blocking
May 6, 2026
Merged

import: filter & blocking batch (8 plugins)#4
Aybook merged 1 commit into
masterfrom
import/filter-and-blocking

Conversation

@Aybook
Copy link
Copy Markdown
Contributor

@Aybook Aybook commented May 6, 2026

Third import batch. Eight filter / block / share-protection plugins, per-plugin layout per #2.

Plugins in this PR

Plugin Upstream Function Notes
`etc_clientblocker` v0.1 (english) Block clients by AP regex pattern (DC++ 0.7xx, AirDC++ 2.xx, etc.) Overlaps with luadch-ng issue #81 but offers value standalone
`etc_client_su_check` v0.2 (english) Warn / block users with invalid or missing SU (Supports Upgrade) feature flags
`etc_ccpmblocker` v2.0 Control CCPM (client-to-client PM); flag removed by default, restored when both peers >= op_level Normalised: scriptname `etc_ccpmblocker2.0` -> `etc_ccpmblocker`; filename also no longer carries the literal "2.0"
`etc_noadvertise` v0.7 (multi) Keyword filter for forbidden / advertised strings in main + PM Database-driven, lang en/de, three state files
`etc_sslonly` v0.2 (german) Kick users on plain ADC, warn team Filename `etc_sslonly_0.2.lua` normalised to `etc_sslonly.lua`. Complementary to luadch-ng issue #77
`etc_hide_announcer` v0.01 (english) Suppress user-announce broadcasts Tiny
`ptx_anti_dl` v2.0 (english) Profile-based anti-download protection (search / download blocks) Two state files at `scripts/data/` shipped as empty `return {}` placeholders so the data dir exists at first save
`ptx_tagcheck` v2.3 (multi3) Release-tag validation Lang en/de/sv

Audit

Normalisations

Two filename / scriptname normalisations to keep things sane on disk and in lang lookups:

  • `etc_ccpmblocker2.0` -> `etc_ccpmblocker`: dropped "2.0" from both the scriptname identifier and the file path. Lang loader (`cfg.loadlanguage(scriptlang, scriptname)`) would otherwise look up `etc_ccpmblocker2.0.lang.` which is awkward.
  • `etc_sslonly_0.2.lua` -> `etc_sslonly.lua`: filename was version-stamped upstream while `scriptname` was already `etc_sslonly`; aligned them.

Both documented in the corresponding file's provenance header.

Test plan

Imports eight filter / block / share-protection plugins from upstream
luadch/scripts. Per-plugin layout per #2.

- etc_clientblocker (v0.1 english): block clients by AP regex pattern
  (DC++ 0.7xx, AirDC++ 2.xx, etc.).
- etc_client_su_check (v0.2 english): warn or block users with
  invalid / missing SU (Supports Upgrade) feature flags.
- etc_ccpmblocker (v2.0): control CCPM (client-to-client PM); flag
  removed by default, restored when both peers are >= op_level. Lang
  unused upstream. Normalised: scriptname "etc_ccpmblocker2.0" ->
  "etc_ccpmblocker"; filename also no longer carries the literal "2.0".
- etc_noadvertise (v0.7 multi): keyword-based filter for forbidden /
  advertised strings in main + PM. Database-driven, lang en/de, three
  state files in data/.
- etc_sslonly (v0.2 german): kick users connected over plain ADC,
  warn team. Filename "etc_sslonly_0.2.lua" normalised to
  "etc_sslonly.lua" on import.
- etc_hide_announcer (v0.01 english): suppress user-announce broadcasts.
- ptx_anti_dl (v2.0 english): anti-download protection; profile-based
  blocks on search/download. Two state files at scripts/data/
  (`tAntiDL`, `tStatAntiDL`); ship empty `return {}` placeholders so
  the data dir exists at first save.
- ptx_tagcheck (v2.3 multi3): release-tag validation. Lang en/de/sv.

Same audit pass: zero hits for setfenv/getfenv/loadstring/unpack/
module/os.execute/io.popen/debug/1-arg-os.difftime; BOMs stripped.

No direct cfg/user.tbl access in any of the 8, so no v3.1.x adapt
needed (unlike etc_NewPasswords in #3).

Smoke harness against luadch-ng/luadch v3.1.1 with all four merged
batches (chat&messaging #1, mod-tools #3, refactor #2, plus this one)
dropped into the install tree: 10 / 10 PASS including "no script
errors in log".
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant