mirror of
https://github.com/matrix-construct/construct
synced 2024-11-15 14:31:11 +01:00
modules/conf: Don't rehash on run; don't rehash on !conf create either.
This commit is contained in:
parent
f74ddd0171
commit
4ab2623ef2
1 changed files with 1 additions and 26 deletions
|
@ -46,31 +46,6 @@ item_error_log
|
||||||
true
|
true
|
||||||
};
|
};
|
||||||
|
|
||||||
static void
|
|
||||||
on_run()
|
|
||||||
{
|
|
||||||
// Suppress errors for this scope.
|
|
||||||
const unwind uw{[] { item_error_log = true; }};
|
|
||||||
item_error_log = false;
|
|
||||||
rehash_conf({}, false);
|
|
||||||
}
|
|
||||||
|
|
||||||
/// Waits for the daemon to transition to the RUN state so we can gather all
|
|
||||||
/// of the registered conf items and save any new ones to the !conf room.
|
|
||||||
/// We can't do that on this module init for two reason:
|
|
||||||
/// - More conf items will load in other modules after this module.
|
|
||||||
/// - Events can't be safely sent to the !conf room until the RUN state.
|
|
||||||
const ircd::run::changed
|
|
||||||
rehash_on_run{[]
|
|
||||||
(const auto &level)
|
|
||||||
{
|
|
||||||
if(level == ircd::run::level::RUN)
|
|
||||||
ctx::context
|
|
||||||
{
|
|
||||||
"confhash", 256_KiB, on_run, ctx::context::POST
|
|
||||||
};
|
|
||||||
}};
|
|
||||||
|
|
||||||
const m::room::id::buf
|
const m::room::id::buf
|
||||||
conf_room_id
|
conf_room_id
|
||||||
{
|
{
|
||||||
|
@ -287,7 +262,7 @@ create_conf_room(const m::event &,
|
||||||
m::vm::eval &)
|
m::vm::eval &)
|
||||||
{
|
{
|
||||||
m::create(conf_room_id, m::me.user_id);
|
m::create(conf_room_id, m::me.user_id);
|
||||||
rehash_conf({}, true);
|
//rehash_conf({}, true);
|
||||||
}
|
}
|
||||||
|
|
||||||
m::hookfn<m::vm::eval &>
|
m::hookfn<m::vm::eval &>
|
||||||
|
|
Loading…
Reference in a new issue