Skip to content

Add libconfig import support to remaining conf files#3409

Open
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix/62-libconfig-import-support
Open

Add libconfig import support to remaining conf files#3409
MrKeiKun wants to merge 1 commit into
HerculesWS:masterfrom
MrKeiKun:fix/62-libconfig-import-support

Conversation

@MrKeiKun

Copy link
Copy Markdown
Contributor

Pull Request Prelude

Changes Proposed

Adds the import: override mechanism to conf files that were missing it, consistent with the existing pattern used in map-server.conf, char-server.conf, etc.

  • conf/atcommand.conf — added import lookup in atcommand_config_read()
  • conf/groups.conf — refactored read_config() in pc_groups.c to use a static config pool so all configs stay alive until inheritance resolution and atcommand->load_groups() complete
  • conf/channels.conf — split read_channels_config() into a _from_file() helper with recursive import support
  • conf/battlegrounds.conf — same wrapper/helper split pattern
  • conf/clans.conf — import recurses with reload=false to avoid clearing the DB on the secondary file
  • conf/network.conf and conf/api/api_network.conf — added import lookup in socket_net_config_read() (already accepted a filename)
  • conf/plugins.conf — replaced the old fopen replace-hack with proper merge support; HPMHooking-first ordering preserved via an is_primary flag

Each modified conf file gets an import: line pointing to conf/import/<name>.conf, and a corresponding skeleton is added to conf/import-tmpl/.

Issues addressed: #62

@MrKeiKun MrKeiKun force-pushed the fix/62-libconfig-import-support branch from 62cf4ca to 3505112 Compare April 20, 2026 14:10
@MrKeiKun MrKeiKun force-pushed the fix/62-libconfig-import-support branch from d26954e to d4106c9 Compare April 28, 2026 10:42
Comment thread src/common/socket.c Outdated
Comment thread src/map/battleground.c Outdated
Comment thread src/map/battleground.c Outdated
Comment thread src/map/channel.c Outdated
Comment thread src/map/channel.c Outdated
Comment thread src/map/clan.c Outdated
Comment thread src/map/pc_groups.c Outdated
@hemagx hemagx added this to the Release v2026.05 milestone May 23, 2026
Adds 'import' directive support to the conf files that previously lacked it:
network.conf, battlegrounds.conf, channels.conf, clans.conf, groups.conf,
atcommand.conf, plugins.conf, and the HPM plugin list. Also adds import-tmpl/
stub files for each so users have a ready-made import target.

The bg_config_read and read_channels_config functions are updated to accept
a filename parameter directly instead of delegating to a separate _from_file
helper. The pc_groups config pool is changed from a fixed-size array to a
VECTOR so import depth is no longer artificially capped.

Signed-off-by: Lorenzo Buitizon <the.keikun@gmail.com>
@MrKeiKun MrKeiKun force-pushed the fix/62-libconfig-import-support branch from d4106c9 to 8b0c9be Compare June 7, 2026 06:34
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.

2 participants