From e21c3bb1408eea41d8f7c6dfbe2a58d023feada7 Mon Sep 17 00:00:00 2001 From: om Date: Fri, 7 Apr 2006 12:21:11 +0000 Subject: Slight optimisation to config reader, looks nicer even if it's not faster. Make ./inspircd script use -nolog (it already used -debug, which didn't exist until now!?) Add commandline options -nolog and -debug, -debug forces all log messages to be output regardless of level. -nolog stops the logfile being written, so you can run with -debug without filling up your disk. make clean && make install, apparently some of the core doesn't depend on inspircd_io.h in the makefiles..so it'll probably segfault if you don't. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3841 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/inspircd_io.h | 30 ++++++++++++++++++++++++------ 1 file changed, 24 insertions(+), 6 deletions(-) (limited to 'include/inspircd_io.h') diff --git a/include/inspircd_io.h b/include/inspircd_io.h index a9de29917..aac40337d 100644 --- a/include/inspircd_io.h +++ b/include/inspircd_io.h @@ -163,7 +163,7 @@ class ServerConfig : public classbase * overridden in the configuration file via * the tag. */ - char ModPath[1024]; + char ModPath[1024]; /** The temporary directory where modules are copied */ @@ -172,7 +172,7 @@ class ServerConfig : public classbase /** The full pathname to the executable, as * given in argv[0] when the program starts. */ - char MyExecutable[1024]; + char MyExecutable[1024]; /** The file handle of the logfile. If this * value is NULL, the log file is not open, @@ -180,24 +180,42 @@ class ServerConfig : public classbase * startup (this should not happen in normal * operation!). */ - FILE *log_file; + 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; + 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 this value is true, halfops have been * enabled in the configuration file. */ - bool AllowHalfop; + bool AllowHalfop; /** The number of seconds the DNS subsystem * will wait before timing out any request. */ - int dns_timeout; + int dns_timeout; /** The size of the read() buffer in the user * handling code, used to read data into a user's -- cgit v1.2.3