0
0
Fork 0
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:
Jason Volk 2018-09-25 01:20:59 -07:00
parent 014aa5b80e
commit 1b2a22bb39

View file

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