• exec/load/ircd/config.js

    From Rob Swindell (on Debian Linux)@VERT to Git commit to main/sbbs/master on Sat Aug 1 02:05:42 2026
    https://gitlab.synchro.net/main/sbbs/-/commit/eec77ec8415ff243a05d7e7d
    Modified Files:
    exec/load/ircd/config.js
    Log Message:
    ircd: keep SYSTEM_* macros through a config conversion or edit

    ircd.conf names the local system with SYSTEM_HOST_NAME, SYSTEM_NAME, SYSTEM_QWKID and VERSION_NOTICE, expanded as the file is read, so the
    shipped file works unedited and a ctrl directory shared between hosts
    gives each of them its own identity. The .ini format had no such
    macro, and Write_Config_File() writes whatever the globals hold -- so ircd_conf2ini.js and an ircdcfg.js "Save" both froze the converting
    host's values into the output.

    There is no correct value to freeze. system.host_name is set per
    process by jsexec's -h, which is how one host runs an IRCd under a
    name other than the BBS's own; converting without the daemon's -h
    silently renamed the server. Where the new name collided with a
    configured link, the result was a server configured to link to itself.

    Expand the macros through a single expand_config_macros(), apply it to
    .ini files as well as .conf, and skip expansion when IRCDCFG_Editor is
    set. The converter and the editor then read the macro unexpanded and
    write it back unchanged, while the daemon resolves it per process as
    before. A converted .ini is now as portable as the .conf it came
    from.

    Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>

    ---
    þ Synchronet þ Vertrauen þ Home of Synchronet þ [vert/cvs/bbs].synchro.net