summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:24 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-21 23:46:24 +0000
commitdcbb0ae938711cd49df73dc2ff6cd6289aeefb44 (patch)
tree82405b49cdba5a0e0f8819df367c75a5c24e455e /include
parentd8f98565a8617658f610bc94a5d87266930beee4 (diff)
Move command-line items to CommandLineConf
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11949 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h113
-rw-r--r--include/inspircd.h4
-rw-r--r--include/logger.h10
3 files changed, 48 insertions, 79 deletions
diff --git a/include/configreader.h b/include/configreader.h
index 024e28909..b0985f1b5 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -110,6 +110,49 @@ class ServerLimits
}
};
+struct CommandLineConf
+{
+ /** If this value is true, the owner of the
+ * server specified -nofork on the command
+ * line, causing the daemon to stay in the
+ * foreground.
+ */
+ bool nofork;
+
+ /** If this value if true then all log
+ * messages will be output, regardless of
+ * the level given in the config file.
+ * This is set with the -debug commandline
+ * option.
+ */
+ bool forcedebug;
+
+ /** If this is true then log output will be
+ * written to the logfile. This is the default.
+ * If you put -nolog on the commandline then
+ * the logfile will not be written.
+ * This is meant to be used in conjunction with
+ * -debug for debugging without filling up the
+ * hard disk.
+ */
+ bool writelog;
+
+ /** True if we have been told to run the testsuite from the commandline,
+ * rather than entering the mainloop.
+ */
+ bool TestSuite;
+
+ /** Saved argc from startup
+ */
+ int argc;
+
+ /** Saved argv from startup
+ */
+ char** argv;
+
+ std::string startup_log;
+};
+
class CoreExport OperInfo : public refcountbase
{
public:
@@ -186,6 +229,10 @@ class CoreExport ServerConfig
*/
ServerLimits Limits;
+ /** Configuration parsed from the command line.
+ */
+ CommandLineConf cmdline;
+
/** Clones CIDR range for ipv4 (0-32)
* Defaults to 32 (checks clones on all IPs seperately)
*/
@@ -209,11 +256,6 @@ class CoreExport ServerConfig
*/
int WhoWasMaxKeep;
- /** Both for set(g|u)id.
- */
- std::string SetUser;
- std::string SetGroup;
-
/** Holds the server name of the local server
* as defined by the administrator.
*/
@@ -316,7 +358,6 @@ class CoreExport ServerConfig
/** This variable identifies which usermodes have been diabled.
*/
-
char DisabledUModes[64];
/** This variable identifies which chanmodes have been disabled.
@@ -326,43 +367,10 @@ class CoreExport ServerConfig
/** The full path to the modules directory.
* This is either set at compile time, or
* overridden in the configuration file via
- * the <options> tag.
+ * the <path> tag.
*/
std::string ModPath;
- /** The file handle of the logfile. If this
- * value is NULL, the log file is not open,
- * probably due to a permissions error on
- * startup (this should not happen in normal
- * operation!).
- */
- FILE *log_file;
-
- /** If this value is true, the owner of the
- * server specified -nofork on the command
- * line, causing the daemon to stay in the
- * foreground.
- */
- bool nofork;
-
- /** If this value if true then all log
- * messages will be output, regardless of
- * the level given in the config file.
- * This is set with the -debug commandline
- * option.
- */
- bool forcedebug;
-
- /** If this is true then log output will be
- * written to the logfile. This is the default.
- * If you put -nolog on the commandline then
- * the logfile will not be written.
- * This is meant to be used in conjunction with
- * -debug for debugging without filling up the
- * hard disk.
- */
- bool writelog;
-
/** If set to true, then all opers on this server are
* shown with a generic 'is an IRC operator' line rather
* than the oper type. Oper types are still used internally.
@@ -417,10 +425,6 @@ class CoreExport ServerConfig
*/
int MaxWhoResults;
- /** True if the DEBUG loglevel is selected.
- */
- int debugging;
-
/** How many seconds to wait before exiting
* the program when /DIE is correctly issued.
*/
@@ -484,10 +488,6 @@ class CoreExport ServerConfig
*/
std::string UserStats;
- /** The path and filename of the ircd.log file
- */
- std::string logpath;
-
/** Default channel modes
*/
std::string DefaultModes;
@@ -504,10 +504,6 @@ class CoreExport ServerConfig
*/
std::map<std::string, int> maxbans;
- /** Directory where the inspircd binary resides
- */
- std::string MyDir;
-
/** If set to true, no user DNS lookups are to be performed
*/
bool NoUserDns;
@@ -536,14 +532,6 @@ class CoreExport ServerConfig
*/
OperIndex oper_blocks;
- /** Saved argv from startup
- */
- char** argv;
-
- /** Saved argc from startup
- */
- int argc;
-
/** Max channels per user
*/
unsigned int MaxChans;
@@ -559,11 +547,6 @@ class CoreExport ServerConfig
*/
std::string sid;
- /** True if we have been told to run the testsuite from the commandline,
- * rather than entering the mainloop.
- */
- bool TestSuite;
-
/** Construct a new ServerConfig
*/
ServerConfig();
diff --git a/include/inspircd.h b/include/inspircd.h
index e79a56f53..ab815dd10 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -315,10 +315,6 @@ class CoreExport InspIRCd
*/
bool AllModulesReportReady(LocalUser* user);
- /** Logfile pathname specified on the commandline, or empty string
- */
- char LogFileName[MAXBUF];
-
/** The current time, updated in the mainloop
*/
time_t TIME;
diff --git a/include/logger.h b/include/logger.h
index f0cbe14d3..ca96ac242 100644
--- a/include/logger.h
+++ b/include/logger.h
@@ -112,10 +112,6 @@ class CoreExport LogManager
*/
bool Logging;
- /** LogStream for -nofork, logs to STDOUT when it's active.
- */
- LogStream* noforkstream;
-
/** Map of active log types and what LogStreams will receive them.
*/
std::map<std::string, std::vector<LogStream *> > LogStreams;
@@ -138,12 +134,6 @@ class CoreExport LogManager
LogManager();
~LogManager();
- /** Sets up the logstream for -nofork. Called by InspIRCd::OpenLog() and LogManager::OpenFileLogs().
- * First time called it creates the nofork stream and stores it in noforkstream. Each call thereafter just readds it to GlobalLogStreams
- * and updates the loglevel.
- */
- void SetupNoFork();
-
/** Adds a FileWriter instance to LogManager, or increments the reference count of an existing instance.
* Used for file-stream sharing for FileLogStreams.
*/