diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd_io.h | 4 | ||||
-rw-r--r-- | include/modules.h | 7 |
2 files changed, 8 insertions, 3 deletions
diff --git a/include/inspircd_io.h b/include/inspircd_io.h index 09d5e5674..df64228a4 100644 --- a/include/inspircd_io.h +++ b/include/inspircd_io.h @@ -19,11 +19,11 @@ void Exit (int); void Start (void); int DaemonSeed (void); -int FileExists (char* file); +bool FileExists (const char* file); int OpenTCPSocket (void); int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr); -void LoadConf(const char* filename, std::stringstream *target); +bool LoadConf(const char* filename, std::stringstream *target); 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); diff --git a/include/modules.h b/include/modules.h index 8f95e4e86..9b6bd0bd8 100644 --- a/include/modules.h +++ b/include/modules.h @@ -471,6 +471,10 @@ class ConfigReader : public classbase * (such as comments) stripped from it. */ std::stringstream *cache; + /** Used to store errors + */ + bool error; + public: /** Default constructor. * This constructor initialises the ConfigReader class to read the inspircd.conf file @@ -498,7 +502,8 @@ class ConfigReader : public classbase */ int Enumerate(std::string tag); /** Returns true if a config file is valid. - * This method is unimplemented and will always return true. + * This method is partially implemented and will only return false if the config + * file does not exist or could not be opened. */ bool Verify(); }; |