DT_IPADDRESS = 6, /* IP address (v4, v6) */
DT_CHANNEL = 7, /* Channel name */
DT_ALLOW_WILD = 64, /* Allow wildcards/CIDR in DT_IPADDRESS */
- DT_ALLOW_NEWLINE = 128 /* New line characters allowed in DT_CHARPTR */
+ DT_ALLOW_NEWLINE = 128, /* New line characters allowed in DT_CHARPTR */
+ DT_BOOTONLY = 256 /* Can only be set on startup, not on rehash */
};
/** Holds a config value, either string, integer or boolean.
/** Value containers */
ValueContainerBase* val;
/** Data types */
- ConfigDataType datatype;
+ int datatype;
/** Validation function */
Validator validation_function;
};
* configutation, appending errors to errorstream
* and setting error if an error has occured.
*/
- bool ParseLine(ConfigDataHash &target, std::string &line, long &linenumber, std::ostringstream &errorstream, int pass, std::istream* scan_for_includes_only);
-
- /** Process an include directive
- */
- bool DoInclude(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream, int pass, std::istream* scan_for_includes_only);
+ bool ParseLine(ConfigDataHash &target, std::string &line, long &linenumber, std::ostringstream &errorstream);
/** Check that there is only one of each configuration item
*/
public:
+ /** Process an include executable directive
+ */
+ bool DoPipe(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream);
+
+ /** Process an include file directive
+ */
+ bool DoInclude(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream);
+
+ User* RehashUser;
+
+ std::string RehashParameter;
+
std::ostringstream errstr;
ConfigDataHash newconfig;
* and initialize this class. All other methods
* should be used only by the core.
*/
- void Read(bool bail, User* user, int pass);
+ void Read(bool bail, User* user);
/** Read a file into a file_cache object
*/
/** 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(ConfigDataHash &target, const char* filename, std::ostringstream &errorstream, int pass, std::istream* scan_for_includs_only);
+ bool LoadConf(ConfigDataHash &target, FILE* &conf, const char* filename, std::ostringstream &errorstream);
/** 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(ConfigDataHash &target, const std::string &filename, std::ostringstream &errorstream, int pass, std::istream* scan_for_includs_only = NULL);
+ bool LoadConf(ConfigDataHash &target, FILE* &conf, const std::string &filename, std::ostringstream &errorstream);
/* Both these return true if the value existed or false otherwise */