Skip to content

Rename all plugin command configs to .dist#505

Open
tsautier wants to merge 3 commits into
drftpd-ng:masterfrom
tsautier:fix/issue-244
Open

Rename all plugin command configs to .dist#505
tsautier wants to merge 3 commits into
drftpd-ng:masterfrom
tsautier:fix/issue-244

Conversation

@tsautier

@tsautier tsautier commented Jan 14, 2026

Copy link
Copy Markdown

Problem

Command configuration files (core.conf, sitebot.conf, etc.) were distributed as .conf files directly. When users upgraded DrFTPD, their custom configurations were overwritten by the new default files.

Solution

Rename all command config files to .conf.dist and update the config loader to use .dist files as fallback when the user's .conf file doesn't exist.

Changes Made

1. Renamed Config Files (All Plugins)

All command config files in src/main/resources/master/config/commands/{ftp,irc}/ were renamed to .conf.dist:

  • core.conf, sitebot.conf, archive.conf, autonuke.conf, dupecheck.conf, find.conf, imdb.conf, jobs.conf, mirror.conf, request.conf, speedtest.net.conf, tvmaze.conf, zipscript.conf

2. Updated Config Loader

Modified GlobalContext.loadCommandConfig() to:

  1. Search for both .conf AND .conf.dist files
  2. For each .conf.dist file, check if the corresponding .conf exists
  3. Only load .conf.dist if .conf is missing (user config takes priority)

Upgrade Behavior

Scenario What Happens
Fresh install .conf.dist is loaded (user has no .conf)
User has custom .conf User's .conf is loaded, .conf.dist ignored
Upgrade Only .conf.dist is updated, user's .conf untouched

Fixes: #244

@tsautier
tsautier force-pushed the fix/issue-244 branch 2 times, most recently from 0f49372 to 66d9aaf Compare January 14, 2026 19:39
@tsautier tsautier changed the title Fix/issue 244 Rename all plugin command configs to .dist Jan 14, 2026
@tsautier

Copy link
Copy Markdown
Author

@mvangoor @hrxcodes for review

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.

Dist config for ftp/irc commands

1 participant