summaryrefslogtreecommitdiff
path: root/src/config.c
diff options
context:
space:
mode:
authorrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-16 15:05:46 +0000
committerrburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864>2009-02-16 15:05:46 +0000
commit0374d53d28b227e537768417b6b7f86ab1b5ca65 (patch)
treebd014b3a2c6fcfdc92e2dfa99fce93ff97bff565 /src/config.c
parent578755d6274daf2eb0de998477960a34755c5d51 (diff)
Add 'w' and 'y' support to dotime(), also prevent a possible overflow - thanks to DP.
git-svn-id: http://anope.svn.sourceforge.net/svnroot/anope/trunk@2093 5417fbe8-f217-4b02-8779-1006273d7864
Diffstat (limited to 'src/config.c')
-rw-r--r--src/config.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/config.c b/src/config.c
index 6cc27aff9..42086cfae 100644
--- a/src/config.c
+++ b/src/config.c
@@ -1159,7 +1159,7 @@ int ServerConfig::Read(bool bail)
if (ConfValue(config_data, static_cast<std::string>(MultiValues[Index].tag),
static_cast<std::string>(MultiValues[Index].items[valuenum]),
static_cast<std::string>(MultiValues[Index].items_default[valuenum]), tagnum, item, allow_newlines)) {
- int time = dotime(item.c_str());
+ time_t time = dotime(item.c_str());
vl.push_back(ValueItem(time));
}
else vl.push_back(ValueItem(0));
@@ -1515,6 +1515,13 @@ ValueItem::ValueItem(int value) : v("")
v = n.str();
}
+ValueItem::ValueItem(time_t value) : v("")
+{
+ std::stringstream n;
+ n << value;
+ v = n.str();
+}
+
ValueItem::ValueItem(bool value) : v("")
{
std::stringstream n;