summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-15 22:20:51 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-11-15 22:20:51 +0000
commit91f17cace8a3ef7ae69cb9597df62c84aef8339c (patch)
treeabe0cf10f35f62b588a78a4bd5f34507e253d479 /src
parentb456e8ec67709cceca510b1dac6c05ac751d7119 (diff)
Tidy up some stuff
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5753 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/configreader.cpp52
1 files changed, 52 insertions, 0 deletions
diff --git a/src/configreader.cpp b/src/configreader.cpp
index 11aa026c2..c854d2ec4 100644
--- a/src/configreader.cpp
+++ b/src/configreader.cpp
@@ -1465,3 +1465,55 @@ InspIRCd* ServerConfig::GetInstance()
return ServerInstance;
}
+
+ValueItem::ValueItem(int value)
+{
+ std::stringstream n;
+ n << value;
+ v = n.str();
+}
+
+ValueItem::ValueItem(bool value)
+{
+ std::stringstream n;
+ n << value;
+ v = n.str();
+}
+
+ValueItem::ValueItem(char* value)
+{
+ v = value;
+}
+
+void ValueItem::Set(char* value)
+{
+ v = value;
+}
+
+void ValueItem::Set(const char* value)
+{
+ v = value;
+}
+
+void ValueItem::Set(int value)
+{
+ std::stringstream n;
+ n << value;
+ v = n.str();
+}
+
+int ValueItem::GetInteger()
+{
+ return atoi(v.c_str());
+}
+
+char* ValueItem::GetString()
+{
+ return (char*)v.c_str();
+}
+
+bool ValueItem::GetBool()
+{
+ return (GetInteger() || v == "yes" || v == "true");
+}
+