summaryrefslogtreecommitdiff
path: root/include/config.h
diff options
context:
space:
mode:
authorAdam <Adam@anope.org>2013-04-11 00:08:28 -0500
committerAdam <Adam@anope.org>2013-04-11 00:08:28 -0500
commit4f9b7874d6b3a41939ecc2e872ec08d03af7b5f1 (patch)
tree43162205d31b277c9ff12ee28b7e3a60d6382316 /include/config.h
parent207c46c871e85b55ae66acc456c6bc412c0c79f9 (diff)
Pass new config and the new config reader to the OnReload event, aswell as call it on module load on modules that hook to it
Diffstat (limited to 'include/config.h')
-rw-r--r--include/config.h16
1 files changed, 11 insertions, 5 deletions
diff --git a/include/config.h b/include/config.h
index 36a4836c8..901fe0138 100644
--- a/include/config.h
+++ b/include/config.h
@@ -707,11 +707,12 @@ class ConfigException : public CoreException
virtual ~ConfigException() throw() { }
};
-#define CONF_NO_ERROR 0x000000
-#define CONF_NOT_A_NUMBER 0x000010
-#define CONF_INT_NEGATIVE 0x000080
-#define CONF_VALUE_NOT_FOUND 0x000100
-#define CONF_FILE_NOT_FOUND 0x000200
+enum
+{
+ CONF_NO_ERROR,
+ CONF_INT_NEGATIVE = 1 << 1,
+ CONF_VALUE_NOT_FOUND = 1 << 2
+};
/** Allows reading of values from configuration files
* This class allows a module to read from either the main configuration file (services.conf) or from
@@ -721,6 +722,7 @@ class ConfigException : public CoreException
*/
class CoreExport ConfigReader
{
+ ServerConfig *conf;
protected:
/** True if an error occured reading the config file
*/
@@ -737,6 +739,10 @@ class CoreExport ConfigReader
* This constructor initialises the ConfigReader class to read a user-specified config file
*/
ConfigReader(const Anope::string &);
+ /** Overloaded constructor
+ * This constructor initialises the ConfigReader class to use a user sepcific ServerConfig object,
+ */
+ ConfigReader(ServerConfig *);
/** Default destructor.
* This method destroys the ConfigReader class.
*/