diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 14:26:38 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-12-14 14:26:38 +0000 |
commit | 70141d07c0e815b2c3794917738b3b740ccd42ea (patch) | |
tree | 9f2d8e0b1073f277902f62150ec47a97b5585187 /include | |
parent | b1a61e6eb309f323fa75c6c8cfe431aa5c931020 (diff) |
Moved a ton of *Conf functions into the ServerConfig class
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2412 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r-- | include/inspircd_io.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/include/inspircd_io.h b/include/inspircd_io.h index e4f2c6de9..eea14d6c0 100644 --- a/include/inspircd_io.h +++ b/include/inspircd_io.h @@ -35,6 +35,7 @@ class ServerConfig { private: std::vector<std::string> include_stack; + fgets_safe(char* buffer, size_t maxsize, FILE* &file); public: char ServerName[MAXBUF]; @@ -76,6 +77,12 @@ class ServerConfig ServerConfig(); void ClearStack(); void Read(bool bail, userrec* user); + 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 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); + int EnumValues(std::stringstream *config, const char* tag, int index); }; @@ -86,12 +93,13 @@ bool FileExists (const char* file); int OpenTCPSocket (void); int BindSocket (int sockfd, struct sockaddr_in client, struct sockaddr_in server, int port, char* addr); -bool LoadConf(const char* filename, std::stringstream *target, std::stringstream* errorstream); +/*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 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); -int EnumValues(std::stringstream *config, const char* tag, int index); +int EnumValues(std::stringstream *config, const char* tag, int index);*/ + void WritePID(std::string filename); #endif |