From 70141d07c0e815b2c3794917738b3b740ccd42ea Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 14 Dec 2005 14:26:38 +0000 Subject: 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 --- include/inspircd_io.h | 12 ++++++++++-- 1 file changed, 10 insertions(+), 2 deletions(-) (limited to 'include') 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 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 -- cgit v1.2.3