diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 23:09:09 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2007-11-11 23:09:09 +0000 |
commit | 5252b3095f1329c547559ae66774227c4629e2c4 (patch) | |
tree | 9570bdb2b495fbdf1e84571cc29a19da8ba151ce /include | |
parent | d41820f19f704687b8ef15c47f38c558e6bf3cee (diff) |
Currently crashes with multiple layers of include. don't use this yet
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8589 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/configreader.h | 14 |
1 files changed, 10 insertions, 4 deletions
diff --git a/include/configreader.h b/include/configreader.h index ac9d0273a..b561a40fd 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -232,11 +232,11 @@ class CoreExport ServerConfig : public Extensible * 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); + 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); + bool DoInclude(ConfigDataHash &target, const std::string &file, std::ostringstream &errorstream, int pass, std::istream* scan_for_includes_only); /** Check that there is only one of each configuration item */ @@ -244,8 +244,14 @@ class CoreExport ServerConfig : public Extensible public: + std::ostringstream errstr; + + ConfigDataHash newconfig; + std::map<std::string, std::istream*> IncludedFiles; + std::map<std::string, bool> CompletedFiles; + size_t TotalDownloaded; size_t FileErrors; @@ -654,12 +660,12 @@ class CoreExport ServerConfig : public Extensible /** 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); + bool LoadConf(ConfigDataHash &target, const char* filename, std::ostringstream &errorstream, int pass, std::istream* scan_for_includs_only); /** 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); + bool LoadConf(ConfigDataHash &target, const std::string &filename, std::ostringstream &errorstream, int pass, std::istream* scan_for_includs_only = NULL); /* Both these return true if the value existed or false otherwise */ |