diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 14:20:04 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-08-09 14:20:04 +0000 |
commit | f0680338833dd76966ba1769980abb9eafb50467 (patch) | |
tree | 4dbfcefd4a49f325e5f9d4a9d60e65702aaef81c /include/configreader.h | |
parent | 542eca81f416df9891e24399b540d8a309950fe1 (diff) |
Tidy up loglevel enum (remove some C-ish defines)
change ServerConfig to pass a pointer to 'this' to Validation etc functions
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@4811 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/configreader.h')
-rw-r--r-- | include/configreader.h | 12 |
1 files changed, 9 insertions, 3 deletions
diff --git a/include/configreader.h b/include/configreader.h index e2ff1c2c9..79384c2db 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -26,9 +26,11 @@ #include "globals.h" #include "modules.h" -typedef bool (*Validator)(const char*, const char*, void*); -typedef bool (*MultiValidator)(const char*, char**, void**, int*); -typedef bool (*MultiNotify)(const char*); +class ServerConfig; + +typedef bool (*Validator)(ServerConfig* conf, const char*, const char*, void*); +typedef bool (*MultiValidator)(ServerConfig* conf, const char*, char**, void**, int*); +typedef bool (*MultiNotify)(ServerConfig* conf, const char*); enum ConfigDataType { DT_NOTHING, DT_INTEGER, DT_CHARPTR, DT_BOOLEAN }; @@ -365,6 +367,10 @@ class ServerConfig : public Extensible */ void Read(bool bail, userrec* user); + /** Read a file into a file_cache object + */ + bool ReadFile(file_cache &F, const char* fname); + /** Load 'filename' into 'target', with the new config parser everything is parsed into * tag/key/value at load-time rather than at read-value time. */ |