diff --git a/include/ircd/m/app.h b/include/ircd/m/app.h index 0ce046437..b300b47b1 100644 --- a/include/ircd/m/app.h +++ b/include/ircd/m/app.h @@ -17,6 +17,7 @@ struct ircd::m::app :instance_list { static log::log log; + static conf::item enable; static conf::item path; static std::set bin; diff --git a/matrix/app.cc b/matrix/app.cc index fce10457d..f7850ba7c 100644 --- a/matrix/app.cc +++ b/matrix/app.cc @@ -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)