mirror of
https://github.com/matrix-construct/construct
synced 2024-12-27 07:54:05 +01:00
construct: Add a -quiet command line option.
This commit is contained in:
parent
3f939367c0
commit
d065ef1aa4
2 changed files with 7 additions and 0 deletions
|
@ -40,6 +40,7 @@ const char *const usererrstr
|
|||
|
||||
bool printversion;
|
||||
bool cmdline;
|
||||
bool quietmode;
|
||||
const char *configfile;
|
||||
const char *execute;
|
||||
lgetopt opts[] =
|
||||
|
@ -48,6 +49,7 @@ lgetopt opts[] =
|
|||
{ "version", &printversion, lgetopt::BOOL, "Print version and exit" },
|
||||
{ "configfile", &configfile, lgetopt::STRING, "File to use for ircd.conf" },
|
||||
{ "debug", &ircd::debugmode, lgetopt::BOOL, "Enable options for debugging" },
|
||||
{ "quiet", &quietmode, lgetopt::BOOL, "Suppress log messages at the terminal." },
|
||||
{ "console", &cmdline, lgetopt::BOOL, "Drop to a command line immediately after startup" },
|
||||
{ "execute", &execute, lgetopt::STRING, "Execute command lines immediately after startup" },
|
||||
{ "nolisten", &ircd::nolisten, lgetopt::BOOL, "Normal execution but without listening sockets" },
|
||||
|
@ -90,6 +92,9 @@ try
|
|||
if(printversion)
|
||||
return print_version();
|
||||
|
||||
if(quietmode)
|
||||
ircd::log::console_disable();
|
||||
|
||||
// The matrix origin is the first positional argument after any switched
|
||||
// arguments. The matrix origin is the hostpart of MXID's for the server.
|
||||
const ircd::string_view origin
|
||||
|
|
|
@ -12,7 +12,9 @@
|
|||
// console.cc
|
||||
//
|
||||
|
||||
extern bool quietmode;
|
||||
extern bool console_active;
|
||||
|
||||
void console_spawn();
|
||||
void console_execute(const std::vector<std::string> &lines);
|
||||
void console_cancel();
|
||||
|
|
Loading…
Reference in a new issue