summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-10 15:05:46 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-03-10 15:05:46 +0000
commit080629c5a119b314166698fe6acac642de3fd6c9 (patch)
treeb2c1138fa1fa1614822eacf5be733e80043149a6 /include
parent4bce10661b1047d0a08b5fa6ec5084aa45ef59e3 (diff)
Added MultiConfig for multiple-occurance config items
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@3631 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/inspircd_io.h11
1 files changed, 10 insertions, 1 deletions
diff --git a/include/inspircd_io.h b/include/inspircd_io.h
index 89b6300de..e98bb3d66 100644
--- a/include/inspircd_io.h
+++ b/include/inspircd_io.h
@@ -33,6 +33,7 @@
#define NONE 50
typedef bool (*Validator)(const char*, const char*, void*);
+typedef bool (*MultiValidator)(const char*, const char**, void**, int**);
enum ConfigDataType { DT_NOTHING, DT_INTEGER, DT_CHARPTR, DT_BOOLEAN };
@@ -40,10 +41,18 @@ struct InitialConfig {
char* tag;
char* value;
void* val;
- int datatype;
+ ConfigDataType datatype;
Validator validation_function;
};
+struct MultiConfig {
+ char* tag;
+ char** items;
+ void** values;
+ ConfigDataType** datatype;
+ MultiValidator validation_function;
+};
+
/** This class holds the bulk of the runtime configuration for the ircd.
* It allows for reading new config values, accessing configuration files,
* and storage of the configuration data needed to run the ircd, such as