summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-15 19:28:06 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-15 19:28:06 +0000
commit235b289194a6345475933612f7c28c993abf5390 (patch)
treed034a4da8501270cedd67e1a735f807fae133ff6 /include
parentc25cf927e82b31014c2d8383c41da6634408cff3 (diff)
Remove tons of pointer craq (theres still a tinnny bit more to remove)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5749 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include')
-rw-r--r--include/configreader.h14
1 files changed, 13 insertions, 1 deletions
diff --git a/include/configreader.h b/include/configreader.h
index d76a8d42e..179827eed 100644
--- a/include/configreader.h
+++ b/include/configreader.h
@@ -58,6 +58,18 @@ class ValueItem
v = value;
}
+ void Set(const std::string &value)
+ {
+ v = value;
+ }
+
+ void Set(int value)
+ {
+ std::stringstream n;
+ n << value;
+ v = n.str();
+ }
+
int GetInteger() { return atoi(v.c_str()); };
const char* GetString() { return v.c_str(); };
@@ -69,7 +81,7 @@ typedef std::deque<ValueItem> ValueList;
/** A callback for validating a single value
*/
-typedef bool (*Validator)(ServerConfig* conf, const char*, const char*, void*);
+typedef bool (*Validator)(ServerConfig* conf, const char*, const char*, ValueItem&);
/** A callback for validating multiple value entries
*/
typedef bool (*MultiValidator)(ServerConfig* conf, const char*, char**, ValueList&, int*);