mirror of
https://github.com/matrix-construct/construct
synced 2024-10-02 21:59:02 +02:00
modules/console: Add conf rehash force option.
This commit is contained in:
parent
014aa5b80e
commit
1b2a22bb39
1 changed files with 11 additions and 1 deletions
|
@ -743,13 +743,23 @@ console_cmd__conf__get(opt &out, const string_view &line)
|
|||
bool
|
||||
console_cmd__conf__rehash(opt &out, const string_view &line)
|
||||
{
|
||||
const params param{line, " ",
|
||||
{
|
||||
"force"
|
||||
}};
|
||||
|
||||
using prototype = void (const bool &);
|
||||
static mods::import<prototype> rehash_conf
|
||||
{
|
||||
"s_conf", "rehash_conf"
|
||||
};
|
||||
|
||||
rehash_conf(false);
|
||||
const bool force
|
||||
{
|
||||
param["force"] == "force"
|
||||
};
|
||||
|
||||
rehash_conf(force);
|
||||
out << "Saved runtime conf items"
|
||||
<< " from the current state into !conf:" << my_host()
|
||||
<< std::endl;
|
||||
|
|
Loading…
Reference in a new issue