mirror of
https://github.com/matrix-construct/construct
synced 2024-10-01 05:08:59 +02:00
modules/s_conf: Avoid throwing an error for non-existent keys during startup.
This commit is contained in:
parent
0a1e267b79
commit
b305a328ed
1 changed files with 11 additions and 0 deletions
|
@ -84,6 +84,17 @@ noexcept try
|
|||
"Updating conf [%s] => %s", key, value
|
||||
};
|
||||
|
||||
if(runlevel == runlevel::START && !conf::exists(key))
|
||||
{
|
||||
log::dwarning
|
||||
{
|
||||
"Cannot set conf item '%s'; does not exist or not loaded yet",
|
||||
key
|
||||
};
|
||||
|
||||
return;
|
||||
}
|
||||
|
||||
ircd::conf::set(key, value);
|
||||
}
|
||||
catch(const std::exception &e)
|
||||
|
|
Loading…
Reference in a new issue