mirror of
https://github.com/matrix-construct/construct
synced 2024-11-29 18:22:50 +01:00
modules/s_conf: Update conf items from !conf state values on startup.
This commit is contained in:
parent
daa1d6481c
commit
90528245de
1 changed files with 14 additions and 0 deletions
|
@ -47,6 +47,11 @@ noexcept
|
||||||
unquote(content.at("value"))
|
unquote(content.at("value"))
|
||||||
};
|
};
|
||||||
|
|
||||||
|
log::debug
|
||||||
|
{
|
||||||
|
"Updating conf [%s] => %s", key, value
|
||||||
|
};
|
||||||
|
|
||||||
ircd::conf::set(key, value);
|
ircd::conf::set(key, value);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -64,7 +69,16 @@ update_conf_hook
|
||||||
static void
|
static void
|
||||||
init_conf_items(const m::event &)
|
init_conf_items(const m::event &)
|
||||||
{
|
{
|
||||||
|
const m::room::state state
|
||||||
|
{
|
||||||
|
conf_room
|
||||||
|
};
|
||||||
|
|
||||||
|
state.for_each("ircd.conf.item", []
|
||||||
|
(const m::event &event)
|
||||||
|
{
|
||||||
|
update_conf(event);
|
||||||
|
});
|
||||||
}
|
}
|
||||||
|
|
||||||
const m::hook
|
const m::hook
|
||||||
|
|
Loading…
Reference in a new issue