Refactors in Brew config

- Brew config fields updated:
- Enabled field now removed.
- Internally, map config file to intermediary struct, then to StackConfig to be coherent with other config fields.
- Remove brew user agent field, now derive that from version number + git commit hash: BlueStation/0.x.x/aabbccdd
- Some small tweaks and improvements
This commit is contained in:
Wouter Bokslag
2026-02-19 12:30:01 +01:00
parent 068093a701
commit 42bd3fe5eb
13 changed files with 454 additions and 185 deletions

View File

@@ -64,13 +64,11 @@ fn build_bs_stack(cfg: &mut SharedConfig) -> MessageRouter {
router.register_entity(Box::new(cmce));
// Register Brew entity if enabled
let brew_cfg = cfg.config().brew.clone();
if brew_cfg.enabled {
if let Some(brew_cfg) = cfg.config().brew.clone() {
let brew_config = BrewConfig {
host: brew_cfg.host,
port: brew_cfg.port,
tls: brew_cfg.tls,
user_agent: brew_cfg.user_agent,
username: brew_cfg.username,
password: brew_cfg.password,
issi: brew_cfg.issi,