mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
construct/ircd: Add option to soft-indicate no modules should be loaded on startup.
This commit is contained in:
parent
7daef82218
commit
af8835aa5c
4 changed files with 14 additions and 0 deletions
|
@ -53,6 +53,7 @@ lgetopt opts[] =
|
||||||
{ "console", &cmdline, lgetopt::BOOL, "Drop to a command line immediately after startup" },
|
{ "console", &cmdline, lgetopt::BOOL, "Drop to a command line immediately after startup" },
|
||||||
{ "execute", &execute, lgetopt::STRING, "Execute command lines immediately after startup" },
|
{ "execute", &execute, lgetopt::STRING, "Execute command lines immediately after startup" },
|
||||||
{ "nolisten", &ircd::nolisten, lgetopt::BOOL, "Normal execution but without listening sockets" },
|
{ "nolisten", &ircd::nolisten, lgetopt::BOOL, "Normal execution but without listening sockets" },
|
||||||
|
{ "noautomod", &ircd::noautomod, lgetopt::BOOL, "Normal execution but without autoloading modules" },
|
||||||
{ nullptr, nullptr, lgetopt::STRING, nullptr },
|
{ nullptr, nullptr, lgetopt::STRING, nullptr },
|
||||||
};
|
};
|
||||||
|
|
||||||
|
|
|
@ -186,6 +186,7 @@ namespace ircd
|
||||||
extern const std::string &config;
|
extern const std::string &config;
|
||||||
extern bool debugmode; ///< Toggle; available only ifdef RB_DEBUG
|
extern bool debugmode; ///< Toggle; available only ifdef RB_DEBUG
|
||||||
extern bool nolisten; ///< Init option to not bind listener socks.
|
extern bool nolisten; ///< Init option to not bind listener socks.
|
||||||
|
extern bool noautomod; ///< Option to not load modules on init.
|
||||||
|
|
||||||
std::string demangle(const std::string &symbol);
|
std::string demangle(const std::string &symbol);
|
||||||
template<class T> std::string demangle();
|
template<class T> std::string demangle();
|
||||||
|
|
|
@ -23,6 +23,7 @@ namespace ircd
|
||||||
ctx::ctx *main_context; // Main program loop
|
ctx::ctx *main_context; // Main program loop
|
||||||
bool debugmode; // meaningful ifdef RB_DEBUG
|
bool debugmode; // meaningful ifdef RB_DEBUG
|
||||||
bool nolisten; // indicates no listener binding
|
bool nolisten; // indicates no listener binding
|
||||||
|
bool noautomod; // no module loading on init
|
||||||
|
|
||||||
void set_runlevel(const enum runlevel &);
|
void set_runlevel(const enum runlevel &);
|
||||||
void at_main_exit() noexcept;
|
void at_main_exit() noexcept;
|
||||||
|
|
11
ircd/m/m.cc
11
ircd/m/m.cc
|
@ -137,6 +137,17 @@ catch(const m::error &e)
|
||||||
void
|
void
|
||||||
ircd::m::init::modules()
|
ircd::m::init::modules()
|
||||||
{
|
{
|
||||||
|
if(ircd::noautomod)
|
||||||
|
{
|
||||||
|
log::warning
|
||||||
|
{
|
||||||
|
"Not loading modules because noautomod flag is set. "
|
||||||
|
"You may still load modules manually."
|
||||||
|
};
|
||||||
|
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
|
||||||
const string_view prefixes[]
|
const string_view prefixes[]
|
||||||
{
|
{
|
||||||
"s_", "m_", "client_", "key_", "federation_", "media_"
|
"s_", "m_", "client_", "key_", "federation_", "media_"
|
||||||
|
|
Loading…
Reference in a new issue