mirror of
https://github.com/matrix-construct/construct
synced 2024-12-26 07:23:53 +01:00
ircd:Ⓜ️:app: Additional conf item to enable w/ persist.
This commit is contained in:
parent
5c1980da70
commit
5ed2022517
2 changed files with 15 additions and 0 deletions
|
@ -17,6 +17,7 @@ struct ircd::m::app
|
|||
:instance_list<ircd::m::app>
|
||||
{
|
||||
static log::log log;
|
||||
static conf::item<bool> enable;
|
||||
static conf::item<std::string> path;
|
||||
static std::set<std::string> bin;
|
||||
|
||||
|
|
|
@ -22,6 +22,14 @@ ircd::m::app::path
|
|||
{ "persist", false },
|
||||
};
|
||||
|
||||
|
||||
decltype(ircd::m::app::enable)
|
||||
ircd::m::app::enable
|
||||
{
|
||||
{ "name", "ircd.m.app.enable" },
|
||||
{ "default", true },
|
||||
};
|
||||
|
||||
decltype(ircd::m::app::bin)
|
||||
ircd::m::app::bin;
|
||||
|
||||
|
@ -106,6 +114,12 @@ ircd::m::app::app(const m::event::idx &event_idx)
|
|||
"Configure the 'ircd.m.app.path' to permit."
|
||||
};
|
||||
|
||||
if(!enable)
|
||||
throw m::FORBIDDEN
|
||||
{
|
||||
"Configure 'ircd.m.app.enable' to permit."
|
||||
};
|
||||
|
||||
const json::string file
|
||||
{
|
||||
arg.at(0)
|
||||
|
|
Loading…
Reference in a new issue