- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(FILE* &conf, const char* filename);
-
- /** Load 'filename' into 'target', with the new config parser everything is parsed into
- * tag/key/value at load-time rather than at read-value time.
- */
- bool LoadConf(FILE* &conf, const std::string &filename);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(const char* tag, const char* var, int index, char* result, int length, bool allow_linefeeds = false);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(const char* tag, const char* var, const char* default_value, int index, char* result, int length, bool allow_linefeeds = false);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(const std::string &tag, const std::string &var, int index, std::string &result, bool allow_linefeeds = false);
-
- /** Writes 'length' chars into 'result' as a string
- */
- bool ConfValue(const std::string &tag, const std::string &var, const std::string &default_value, int index, std::string &result, bool allow_linefeeds = false);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(const char* tag, const char* var, int index, int &result);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(const char* tag, const char* var, const char* default_value, int index, int &result);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(const std::string &tag, const std::string &var, int index, int &result);
-
- /** Tries to convert the value to an integer and write it to 'result'
- */
- bool ConfValueInteger(const std::string &tag, const std::string &var, const std::string &default_value, int index, int &result);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(const char* tag, const char* var, int index);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(const char* tag, const char* var, const char* default_value, int index);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(const std::string &tag, const std::string &var, int index);
-
- /** Returns true if the value exists and has a true value, false otherwise
- */
- bool ConfValueBool(const std::string &tag, const std::string &var, const std::string &default_value, int index);
-
- /** Returns the number of occurences of tag in the config file
- */
- int ConfValueEnum(const char* tag);
- /** Returns the number of occurences of tag in the config file
- */
- int ConfValueEnum(const std::string &tag);
-
- /** Returns the numbers of vars inside the index'th 'tag in the config file
- */
- int ConfVarEnum(const char* tag, int index);
- /** Returns the numbers of vars inside the index'th 'tag in the config file
- */
- int ConfVarEnum(const std::string &tag, int index);
-
- /** Validates a hostname value, throwing ConfigException if it is not valid
- */
- void ValidateHostname(const char* p, const std::string &tag, const std::string &val);
-
- /** Validates an IP address value, throwing ConfigException if it is not valid
- */
- void ValidateIP(const char* p, const std::string &tag, const std::string &val, bool wild);
-
- /** Validates a value that should not contain spaces, throwing ConfigException of it is not valid
- */
- void ValidateNoSpaces(const char* p, const std::string &tag, const std::string &val);
-
- /** Returns the fully qualified path to the inspircd directory
- * @return The full program directory
- */
- std::string GetFullProgDir();