0
0
Fork 0
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:
Jason Volk 2018-05-25 21:06:32 -07:00
parent 0a1e267b79
commit b305a328ed

View file

@ -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)