#define SPARSE 40
#define NONE 50
+typedef bool (*Validator)(const char*, const char*, void*);
+
+enum ConfigDataType { DT_NOTHING, DT_INTEGER, DT_CHARPTR, DT_BOOLEAN };
+
+struct InitialConfig {
+ char* tag;
+ char* value;
+ void* val;
+ int datatype;
+ Validator validation_function;
+};
+
/** 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
*/
char ModPath[1024];
+ /** The temporary directory where modules are copied
+ */
+ char TempDir[1024];
+
/** The full pathname to the executable, as
* given in argv[0] when the program starts.
*/
*/
bool HideSplits;
+ /** True if we're going to hide ban reasons for non-opers (e.g. G-Lines,
+ * K-Lines, Z-Lines)
+ */
+ bool HideBans;
+
/** Set to a non-empty string to obfuscate the server name of users in WHOIS
*/
char HideWhoisServer[MAXBUF];
*/
char CustomVersion[MAXBUF];
+ /** List of u-lined servers
+ */
+ std::vector<irc::string> ulines;
+
+ /** Max banlist sizes for channels (the std::string is a glob)
+ */
+ std::map<std::string,int> maxbans;
+
ServerConfig();
/** Clears the include stack in preperation for
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 ConfValueInteger(char* tag, char* var, int index, 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);