#include <inspircd_io.h>
Inheritance diagram for ServerConfig:
Public Member Functions | |
ServerConfig () | |
void | ClearStack () |
Clears the include stack in preperation for a Read() call. | |
void | Read (bool bail, userrec *user) |
Read the entire configuration into memory and initialize this class. | |
bool | LoadConf (const char *filename, std::stringstream *target, std::stringstream *errorstream) |
int | ConfValue (char *tag, char *var, int index, char *result, std::stringstream *config) |
int | ReadConf (std::stringstream *config_f, const char *tag, const char *var, int index, char *result) |
int | ConfValueEnum (char *tag, std::stringstream *config) |
int | EnumConf (std::stringstream *config_f, const char *tag) |
int | EnumValues (std::stringstream *config, const char *tag, int index) |
Public Attributes | |
char | ServerName [MAXBUF] |
Holds the server name of the local server as defined by the administrator. | |
char | Network [MAXBUF] |
char | ServerDesc [MAXBUF] |
Holds the description of the local server as defined by the administrator. | |
char | AdminName [MAXBUF] |
Holds the admin's name, for output in the /ADMIN command. | |
char | AdminEmail [MAXBUF] |
Holds the email address of the admin, for output in the /ADMIN command. | |
char | AdminNick [MAXBUF] |
Holds the admin's nickname, for output in the /ADMIN command. | |
char | diepass [MAXBUF] |
The admin-configured /DIE password. | |
char | restartpass [MAXBUF] |
The admin-configured /RESTART password. | |
char | motd [MAXBUF] |
The pathname and filename of the message of the day file, as defined by the administrator. | |
char | rules [MAXBUF] |
The pathname and filename of the rules file, as defined by the administrator. | |
char | PrefixQuit [MAXBUF] |
The quit prefix in use, or an empty string. | |
char | DieValue [MAXBUF] |
The last string found within a <die> tag, or an empty string. | |
char | DNSServer [MAXBUF] |
The DNS server to use for DNS queries. | |
char | DisabledCommands [MAXBUF] |
This variable contains a space-seperated list of commands which are disabled by the administrator of the server for non-opers. | |
char | ModPath [1024] |
The full path to the modules directory. | |
char | MyExecutable [1024] |
The full pathname to the executable, as given in argv[0] when the program starts. | |
FILE * | log_file |
The file handle of the logfile. | |
bool | nofork |
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 | unlimitcore |
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. | |
bool | AllowHalfop |
If this value is true, halfops have been enabled in the configuration file. | |
int | dns_timeout |
The number of seconds the DNS subsystem will wait before timing out any request. | |
int | NetBufferSize |
The size of the read() buffer in the user handling code, used to read data into a user's recvQ. | |
int | MaxConn |
The value to be used for listen() backlogs as default. | |
unsigned int | SoftLimit |
The soft limit value assigned to the irc server. | |
int | MaxWhoResults |
The maximum number of /WHO results allowed in any single /WHO command. | |
int | debugging |
True if the DEBUG loglevel is selected. | |
int | LogLevel |
The loglevel in use by the IRC server. | |
int | DieDelay |
How many seconds to wait before exiting the program when /DIE is correctly issued. | |
char | addrs [MAXBUF][255] |
A list of IP addresses the server is listening on. | |
file_cache | MOTD |
The MOTD file, cached in a file_cache type. | |
file_cache | RULES |
The RULES file, cached in a file_cache type. | |
char | PID [1024] |
The full pathname and filename of the PID file as defined in the configuration. | |
std::stringstream | config_f |
The parsed configuration file as a stringstream. | |
ClassVector | Classes |
The connect classes in use by the IRC server. | |
std::vector< std::string > | module_names |
A list of module names (names only, no paths) which are currently loaded by the server. | |
Private Member Functions | |
int | fgets_safe (char *buffer, size_t maxsize, FILE *&file) |
Used by the config file subsystem to safely read a C-style string without dependency upon any certain style of linefeed, e.g. | |
std::string | ConfProcess (char *buffer, long linenumber, std::stringstream *errorstream, bool &error, std::string filename) |
This private method processes one line of configutation, appending errors to errorstream and setting error if an error has occured. | |
Private Attributes | |
std::vector< std::string > | include_stack |
This variable holds the names of all files included from the main one. |
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.
Definition at line 39 of file inspircd_io.h.
|
|
|
Clears the include stack in preperation for a Read() call.
Referenced by ConfigReader::ConfigReader(). |
|
This private method processes one line of configutation, appending errors to errorstream and setting error if an error has occured.
|
|
Referenced by userrec::HasPermission(). |
|
|
|
Referenced by ConfigReader::Enumerate(). |
|
Referenced by ConfigReader::EnumerateValues(). |
|
Used by the config file subsystem to safely read a C-style string without dependency upon any certain style of linefeed, e.g. it can read both windows and UNIX style linefeeds transparently. |
|
Referenced by ConfigReader::ConfigReader(). |
|
Read the entire configuration into memory and initialize this class. All other methods should be used only by the core. Referenced by Server::RehashServer(). |
|
Referenced by ConfigReader::ReadFlag(), ConfigReader::ReadInteger(), and ConfigReader::ReadValue(). |
|
A list of IP addresses the server is listening on.
Definition at line 216 of file inspircd_io.h. |
|
Holds the email address of the admin, for output in the /ADMIN command.
Definition at line 89 of file inspircd_io.h. |
|
Holds the admin's name, for output in the /ADMIN command.
Definition at line 84 of file inspircd_io.h. |
|
Holds the admin's nickname, for output in the /ADMIN command.
Definition at line 94 of file inspircd_io.h. |
|
If this value is true, halfops have been enabled in the configuration file.
Definition at line 171 of file inspircd_io.h. |
|
The connect classes in use by the IRC server.
Definition at line 242 of file inspircd_io.h. |
|
The parsed configuration file as a stringstream. You should pass this to any configuration methods of this class, and not access it directly. It is recommended that modules use ConfigReader instead which provides a simpler abstraction of configuration files. Definition at line 238 of file inspircd_io.h. Referenced by userrec::HasPermission(). |
|
True if the DEBUG loglevel is selected.
Definition at line 202 of file inspircd_io.h. |
|
How many seconds to wait before exiting the program when /DIE is correctly issued.
Definition at line 211 of file inspircd_io.h. |
|
The admin-configured /DIE password.
Definition at line 98 of file inspircd_io.h. |
|
The last string found within a <die> tag, or an empty string.
Definition at line 121 of file inspircd_io.h. |
|
This variable contains a space-seperated list of commands which are disabled by the administrator of the server for non-opers.
Definition at line 131 of file inspircd_io.h. |
|
The number of seconds the DNS subsystem will wait before timing out any request.
Definition at line 176 of file inspircd_io.h. |
|
The DNS server to use for DNS queries.
Definition at line 125 of file inspircd_io.h. |
|
This variable holds the names of all files included from the main one. This is used to make sure that no files are recursively included. Definition at line 47 of file inspircd_io.h. |
|
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!). Definition at line 151 of file inspircd_io.h. |
|
The loglevel in use by the IRC server.
Definition at line 206 of file inspircd_io.h. |
|
The value to be used for listen() backlogs as default.
Definition at line 187 of file inspircd_io.h. |
|
The maximum number of /WHO results allowed in any single /WHO command.
Definition at line 198 of file inspircd_io.h. |
|
The full path to the modules directory. This is either set at compile time, or overridden in the configuration file via the <options> tag. Definition at line 138 of file inspircd_io.h. |
|
A list of module names (names only, no paths) which are currently loaded by the server.
Definition at line 247 of file inspircd_io.h. Referenced by Server::FindModule(). |
|
The MOTD file, cached in a file_cache type.
Definition at line 220 of file inspircd_io.h. |
|
The pathname and filename of the message of the day file, as defined by the administrator.
Definition at line 107 of file inspircd_io.h. |
|
The full pathname to the executable, as given in argv[0] when the program starts.
Definition at line 143 of file inspircd_io.h. |
|
The size of the read() buffer in the user handling code, used to read data into a user's recvQ.
Definition at line 182 of file inspircd_io.h. |
|
Definition at line 74 of file inspircd_io.h. |
|
If this value is true, the owner of the server specified -nofork on the command line, causing the daemon to stay in the foreground.
Definition at line 158 of file inspircd_io.h. |
|
The full pathname and filename of the PID file as defined in the configuration.
Definition at line 229 of file inspircd_io.h. |
|
The quit prefix in use, or an empty string.
Definition at line 116 of file inspircd_io.h. |
|
The admin-configured /RESTART password.
Definition at line 102 of file inspircd_io.h. |
|
The RULES file, cached in a file_cache type.
Definition at line 224 of file inspircd_io.h. |
|
The pathname and filename of the rules file, as defined by the administrator.
Definition at line 112 of file inspircd_io.h. |
|
Holds the description of the local server as defined by the administrator.
Definition at line 79 of file inspircd_io.h. |
|
Holds the server name of the local server as defined by the administrator.
Definition at line 68 of file inspircd_io.h. Referenced by userrec::userrec(). |
|
The soft limit value assigned to the irc server. The IRC server will not allow more than this number of local users. Definition at line 193 of file inspircd_io.h. |
|
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. This is often used when debugging. Definition at line 166 of file inspircd_io.h. |