.TH "ServerConfig" 3 "14 Dec 2005" "Version 1.0Betareleases" "InspIRCd" \" -*- nroff -*- .ad l .nh .SH NAME ServerConfig \- This class holds the bulk of the runtime configuration for the ircd. .PP .SH SYNOPSIS .br .PP \fC#include \fP .PP Inherits \fBclassbase\fP. .PP .SS "Public Member Functions" .in +1c .ti -1c .RI "\fBServerConfig\fP ()" .br .ti -1c .RI "void \fBClearStack\fP ()" .br .RI "\fIClears the include stack in preperation for a \fBRead()\fP call. \fP" .ti -1c .RI "void \fBRead\fP (bool bail, \fBuserrec\fP *user)" .br .RI "\fIRead the entire configuration into memory and initialize this class. \fP" .ti -1c .RI "bool \fBLoadConf\fP (const char *filename, std::stringstream *target, std::stringstream *errorstream)" .br .ti -1c .RI "int \fBConfValue\fP (char *tag, char *var, int index, char *result, std::stringstream *config)" .br .ti -1c .RI "int \fBReadConf\fP (std::stringstream *\fBconfig_f\fP, const char *tag, const char *var, int index, char *result)" .br .ti -1c .RI "int \fBConfValueEnum\fP (char *tag, std::stringstream *config)" .br .ti -1c .RI "int \fBEnumConf\fP (std::stringstream *\fBconfig_f\fP, const char *tag)" .br .ti -1c .RI "int \fBEnumValues\fP (std::stringstream *config, const char *tag, int index)" .br .in -1c .SS "Public Attributes" .in +1c .ti -1c .RI "char \fBServerName\fP [MAXBUF]" .br .RI "\fIHolds the server name of the local server as defined by the administrator. \fP" .ti -1c .RI "char \fBNetwork\fP [MAXBUF]" .br .ti -1c .RI "char \fBServerDesc\fP [MAXBUF]" .br .RI "\fIHolds the description of the local server as defined by the administrator. \fP" .ti -1c .RI "char \fBAdminName\fP [MAXBUF]" .br .RI "\fIHolds the admin's name, for output in the /ADMIN command. \fP" .ti -1c .RI "char \fBAdminEmail\fP [MAXBUF]" .br .RI "\fIHolds the email address of the admin, for output in the /ADMIN command. \fP" .ti -1c .RI "char \fBAdminNick\fP [MAXBUF]" .br .RI "\fIHolds the admin's nickname, for output in the /ADMIN command. \fP" .ti -1c .RI "char \fBdiepass\fP [MAXBUF]" .br .RI "\fIThe admin-configured /DIE password. \fP" .ti -1c .RI "char \fBrestartpass\fP [MAXBUF]" .br .RI "\fIThe admin-configured /RESTART password. \fP" .ti -1c .RI "char \fBmotd\fP [MAXBUF]" .br .RI "\fIThe pathname and filename of the message of the day file, as defined by the administrator. \fP" .ti -1c .RI "char \fBrules\fP [MAXBUF]" .br .RI "\fIThe pathname and filename of the rules file, as defined by the administrator. \fP" .ti -1c .RI "char \fBPrefixQuit\fP [MAXBUF]" .br .RI "\fIThe quit prefix in use, or an empty string. \fP" .ti -1c .RI "char \fBDieValue\fP [MAXBUF]" .br .RI "\fIThe last string found within a tag, or an empty string. \fP" .ti -1c .RI "char \fBDNSServer\fP [MAXBUF]" .br .RI "\fIThe \fBDNS\fP server to use for \fBDNS\fP queries. \fP" .ti -1c .RI "char \fBDisabledCommands\fP [MAXBUF]" .br .RI "\fIThis variable contains a space-seperated list of commands which are disabled by the administrator of the server for non-opers. \fP" .ti -1c .RI "char \fBModPath\fP [1024]" .br .RI "\fIThe full path to the modules directory. \fP" .ti -1c .RI "char \fBMyExecutable\fP [1024]" .br .RI "\fIThe full pathname to the executable, as given in argv[0] when the program starts. \fP" .ti -1c .RI "FILE * \fBlog_file\fP" .br .RI "\fIThe file handle of the logfile. \fP" .ti -1c .RI "bool \fBnofork\fP" .br .RI "\fIIf this value is true, the owner of the server specified -nofork on the command line, causing the daemon to stay in the foreground. \fP" .ti -1c .RI "bool \fBunlimitcore\fP" .br .RI "\fIIf this value is true, the owner of the server has chosen to unlimit the coredump size to as large a value as his account settings will allow. \fP" .ti -1c .RI "bool \fBAllowHalfop\fP" .br .RI "\fIIf this value is true, halfops have been enabled in the configuration file. \fP" .ti -1c .RI "int \fBdns_timeout\fP" .br .RI "\fIThe number of seconds the \fBDNS\fP subsystem will wait before timing out any request. \fP" .ti -1c .RI "int \fBNetBufferSize\fP" .br .RI "\fIThe size of the read() buffer in the user handling code, used to read data into a user's recvQ. \fP" .ti -1c .RI "int \fBMaxConn\fP" .br .RI "\fIThe value to be used for listen() backlogs as default. \fP" .ti -1c .RI "unsigned int \fBSoftLimit\fP" .br .RI "\fIThe soft limit value assigned to the irc server. \fP" .ti -1c .RI "int \fBMaxWhoResults\fP" .br .RI "\fIThe maximum number of /WHO results allowed in any single /WHO command. \fP" .ti -1c .RI "int \fBdebugging\fP" .br .RI "\fITrue if the DEBUG loglevel is selected. \fP" .ti -1c .RI "int \fBLogLevel\fP" .br .RI "\fIThe loglevel in use by the IRC server. \fP" .ti -1c .RI "int \fBDieDelay\fP" .br .RI "\fIHow many seconds to wait before exiting the program when /DIE is correctly issued. \fP" .ti -1c .RI "char \fBaddrs\fP [MAXBUF][255]" .br .RI "\fIA list of IP addresses the server is listening on. \fP" .ti -1c .RI "\fBfile_cache\fP \fBMOTD\fP" .br .RI "\fIThe MOTD file, cached in a file_cache type. \fP" .ti -1c .RI "\fBfile_cache\fP \fBRULES\fP" .br .RI "\fIThe RULES file, cached in a file_cache type. \fP" .ti -1c .RI "char \fBPID\fP [1024]" .br .RI "\fIThe full pathname and filename of the PID file as defined in the configuration. \fP" .ti -1c .RI "std::stringstream \fBconfig_f\fP" .br .RI "\fIThe parsed configuration file as a stringstream. \fP" .ti -1c .RI "\fBClassVector\fP \fBClasses\fP" .br .RI "\fIThe connect classes in use by the IRC server. \fP" .ti -1c .RI "std::vector< \fBstd::string\fP > \fBmodule_names\fP" .br .RI "\fIA list of module names (names only, no paths) which are currently loaded by the server. \fP" .in -1c .SS "Private Member Functions" .in +1c .ti -1c .RI "int \fBfgets_safe\fP (char *buffer, size_t maxsize, FILE *&file)" .br .RI "\fIUsed by the config file subsystem to safely read a C-style string without dependency upon any certain style of linefeed, e.g. \fP" .ti -1c .RI "\fBstd::string\fP \fBConfProcess\fP (char *buffer, long linenumber, std::stringstream *errorstream, bool &error, \fBstd::string\fP filename)" .br .RI "\fIThis private method processes one line of configutation, appending errors to errorstream and setting error if an error has occured. \fP" .in -1c .SS "Private Attributes" .in +1c .ti -1c .RI "std::vector< \fBstd::string\fP > \fBinclude_stack\fP" .br .RI "\fIThis variable holds the names of all files included from the main one. \fP" .in -1c .SH "Detailed Description" .PP This class holds the bulk of the runtime configuration for the ircd. It allows for reading new config values, accessing configuration files, and storage of the configuration data needed to run the ircd, such as the servername, connect classes, /ADMIN data, MOTDs and filenames etc. .PP Definition at line 39 of file inspircd_io.h. .SH "Constructor & Destructor Documentation" .PP .SS "ServerConfig::ServerConfig ()" .PP .SH "Member Function Documentation" .PP .SS "void ServerConfig::ClearStack ()" .PP Clears the include stack in preperation for a \fBRead()\fP call. .PP Referenced by ConfigReader::ConfigReader(). .SS "\fBstd::string\fP ServerConfig::ConfProcess (char * buffer, long linenumber, std::stringstream * errorstream, bool & error, \fBstd::string\fP filename)\fC [private]\fP" .PP This private method processes one line of configutation, appending errors to errorstream and setting error if an error has occured. .PP .SS "int ServerConfig::ConfValue (char * tag, char * var, int index, char * result, std::stringstream * config)" .PP Referenced by userrec::HasPermission(). .SS "int ServerConfig::ConfValueEnum (char * tag, std::stringstream * config)" .PP .SS "int ServerConfig::EnumConf (std::stringstream * config_f, const char * tag)" .PP Referenced by ConfigReader::Enumerate(). .SS "int ServerConfig::EnumValues (std::stringstream * config, const char * tag, int index)" .PP Referenced by ConfigReader::EnumerateValues(). .SS "int ServerConfig::fgets_safe (char * buffer, size_t maxsize, FILE *& file)\fC [private]\fP" .PP Used by the config file subsystem to safely read a C-style string without dependency upon any certain style of linefeed, e.g. .PP it can read both windows and UNIX style linefeeds transparently. .SS "bool ServerConfig::LoadConf (const char * filename, std::stringstream * target, std::stringstream * errorstream)" .PP Referenced by ConfigReader::ConfigReader(). .SS "void ServerConfig::Read (bool bail, \fBuserrec\fP * user)" .PP Read the entire configuration into memory and initialize this class. .PP All other methods should be used only by the core. .PP Referenced by Server::RehashServer(). .SS "int ServerConfig::ReadConf (std::stringstream * config_f, const char * tag, const char * var, int index, char * result)" .PP Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). .SH "Member Data Documentation" .PP .SS "char \fBServerConfig::addrs\fP[MAXBUF][255]" .PP A list of IP addresses the server is listening on. .PP Definition at line 216 of file inspircd_io.h. .SS "char \fBServerConfig::AdminEmail\fP[MAXBUF]" .PP Holds the email address of the admin, for output in the /ADMIN command. .PP Definition at line 89 of file inspircd_io.h. .SS "char \fBServerConfig::AdminName\fP[MAXBUF]" .PP Holds the admin's name, for output in the /ADMIN command. .PP Definition at line 84 of file inspircd_io.h. .SS "char \fBServerConfig::AdminNick\fP[MAXBUF]" .PP Holds the admin's nickname, for output in the /ADMIN command. .PP Definition at line 94 of file inspircd_io.h. .SS "bool \fBServerConfig::AllowHalfop\fP" .PP If this value is true, halfops have been enabled in the configuration file. .PP Definition at line 171 of file inspircd_io.h. .SS "\fBClassVector\fP \fBServerConfig::Classes\fP" .PP The connect classes in use by the IRC server. .PP Definition at line 242 of file inspircd_io.h. .SS "std::stringstream \fBServerConfig::config_f\fP" .PP The parsed configuration file as a stringstream. .PP You should pass this to any configuration methods of this class, and not access it directly. It is recommended that modules use \fBConfigReader\fP instead which provides a simpler abstraction of configuration files. .PP Definition at line 238 of file inspircd_io.h. .PP Referenced by userrec::HasPermission(). .SS "int \fBServerConfig::debugging\fP" .PP True if the DEBUG loglevel is selected. .PP Definition at line 202 of file inspircd_io.h. .SS "int \fBServerConfig::DieDelay\fP" .PP How many seconds to wait before exiting the program when /DIE is correctly issued. .PP Definition at line 211 of file inspircd_io.h. .SS "char \fBServerConfig::diepass\fP[MAXBUF]" .PP The admin-configured /DIE password. .PP Definition at line 98 of file inspircd_io.h. .SS "char \fBServerConfig::DieValue\fP[MAXBUF]" .PP The last string found within a tag, or an empty string. .PP Definition at line 121 of file inspircd_io.h. .SS "char \fBServerConfig::DisabledCommands\fP[MAXBUF]" .PP This variable contains a space-seperated list of commands which are disabled by the administrator of the server for non-opers. .PP Definition at line 131 of file inspircd_io.h. .SS "int \fBServerConfig::dns_timeout\fP" .PP The number of seconds the \fBDNS\fP subsystem will wait before timing out any request. .PP Definition at line 176 of file inspircd_io.h. .SS "char \fBServerConfig::DNSServer\fP[MAXBUF]" .PP The \fBDNS\fP server to use for \fBDNS\fP queries. .PP Definition at line 125 of file inspircd_io.h. .SS "std::vector<\fBstd::string\fP> \fBServerConfig::include_stack\fP\fC [private]\fP" .PP This variable holds the names of all files included from the main one. .PP This is used to make sure that no files are recursively included. .PP Definition at line 47 of file inspircd_io.h. .SS "FILE* \fBServerConfig::log_file\fP" .PP The file handle of the logfile. .PP 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!). .PP Definition at line 151 of file inspircd_io.h. .SS "int \fBServerConfig::LogLevel\fP" .PP The loglevel in use by the IRC server. .PP Definition at line 206 of file inspircd_io.h. .SS "int \fBServerConfig::MaxConn\fP" .PP The value to be used for listen() backlogs as default. .PP Definition at line 187 of file inspircd_io.h. .SS "int \fBServerConfig::MaxWhoResults\fP" .PP The maximum number of /WHO results allowed in any single /WHO command. .PP Definition at line 198 of file inspircd_io.h. .SS "char \fBServerConfig::ModPath\fP[1024]" .PP The full path to the modules directory. .PP This is either set at compile time, or overridden in the configuration file via the tag. .PP Definition at line 138 of file inspircd_io.h. .SS "std::vector<\fBstd::string\fP> \fBServerConfig::module_names\fP" .PP A list of module names (names only, no paths) which are currently loaded by the server. .PP Definition at line 247 of file inspircd_io.h. .PP Referenced by Server::FindModule(). .SS "\fBfile_cache\fP \fBServerConfig::MOTD\fP" .PP The MOTD file, cached in a file_cache type. .PP Definition at line 220 of file inspircd_io.h. .SS "char \fBServerConfig::motd\fP[MAXBUF]" .PP The pathname and filename of the message of the day file, as defined by the administrator. .PP Definition at line 107 of file inspircd_io.h. .SS "char \fBServerConfig::MyExecutable\fP[1024]" .PP The full pathname to the executable, as given in argv[0] when the program starts. .PP Definition at line 143 of file inspircd_io.h. .SS "int \fBServerConfig::NetBufferSize\fP" .PP The size of the read() buffer in the user handling code, used to read data into a user's recvQ. .PP Definition at line 182 of file inspircd_io.h. .SS "char \fBServerConfig::Network\fP[MAXBUF]" .PP Definition at line 74 of file inspircd_io.h. .SS "bool \fBServerConfig::nofork\fP" .PP If this value is true, the owner of the server specified -nofork on the command line, causing the daemon to stay in the foreground. .PP Definition at line 158 of file inspircd_io.h. .SS "char \fBServerConfig::PID\fP[1024]" .PP The full pathname and filename of the PID file as defined in the configuration. .PP Definition at line 229 of file inspircd_io.h. .SS "char \fBServerConfig::PrefixQuit\fP[MAXBUF]" .PP The quit prefix in use, or an empty string. .PP Definition at line 116 of file inspircd_io.h. .SS "char \fBServerConfig::restartpass\fP[MAXBUF]" .PP The admin-configured /RESTART password. .PP Definition at line 102 of file inspircd_io.h. .SS "\fBfile_cache\fP \fBServerConfig::RULES\fP" .PP The RULES file, cached in a file_cache type. .PP Definition at line 224 of file inspircd_io.h. .SS "char \fBServerConfig::rules\fP[MAXBUF]" .PP The pathname and filename of the rules file, as defined by the administrator. .PP Definition at line 112 of file inspircd_io.h. .SS "char \fBServerConfig::ServerDesc\fP[MAXBUF]" .PP Holds the description of the local server as defined by the administrator. .PP Definition at line 79 of file inspircd_io.h. .SS "char \fBServerConfig::ServerName\fP[MAXBUF]" .PP Holds the server name of the local server as defined by the administrator. .PP Definition at line 68 of file inspircd_io.h. .PP Referenced by userrec::userrec(). .SS "unsigned int \fBServerConfig::SoftLimit\fP" .PP The soft limit value assigned to the irc server. .PP The IRC server will not allow more than this number of local users. .PP Definition at line 193 of file inspircd_io.h. .SS "bool \fBServerConfig::unlimitcore\fP" .PP If this value is true, the owner of the server has chosen to unlimit the coredump size to as large a value as his account settings will allow. .PP This is often used when debugging. .PP Definition at line 166 of file inspircd_io.h. .SH "Author" .PP Generated automatically by Doxygen for InspIRCd from the source code.