summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
Diffstat (limited to 'include')
-rw-r--r--include/inspircd.h2
-rw-r--r--include/inspircd_io.h2
-rw-r--r--include/modules.h8
3 files changed, 10 insertions, 2 deletions
diff --git a/include/inspircd.h b/include/inspircd.h
index d55ccccf4..1a19584f6 100644
--- a/include/inspircd.h
+++ b/include/inspircd.h
@@ -89,7 +89,7 @@ int InspIRCd(void);
int InitConfig(void);
void Error(int status);
void send_error(char *s);
-void ReadConfig(void);
+void ReadConfig(bool bail,userrec* user);
void strlower(char *n);
void WriteOpers(char* text, ...);
diff --git a/include/inspircd_io.h b/include/inspircd_io.h
index 28e55bd0b..2ff7568c0 100644
--- a/include/inspircd_io.h
+++ b/include/inspircd_io.h
@@ -23,7 +23,7 @@ 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);
+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);
diff --git a/include/modules.h b/include/modules.h
index dc17b99c0..81d76d55d 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -647,6 +647,7 @@ class ConfigReader : public classbase
* (such as comments) stripped from it.
*/
std::stringstream *cache;
+ std::stringstream *errorlog;
/** Used to store errors
*/
bool readerror;
@@ -703,6 +704,13 @@ class ConfigReader : public classbase
* file does not exist or could not be opened.
*/
bool Verify();
+ /** Dumps the list of errors in a config file to an output location. If bail is true,
+ * then the program will abort. If bail is false and user points to a valid user
+ * record, the error report will be spooled to the given user by means of NOTICE.
+ * if bool is false AND user is false, the error report will be spooled to all opers
+ * by means of a NOTICE to all opers.
+ */
+ void DumpErrors(bool bail,userrec* user);
/** Returns the number of items within a tag.
* For example if the tag was <test tag="blah" data="foo"> then this