diff options
author | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-16 15:05:46 +0000 |
---|---|---|
committer | rburchell <rburchell@5417fbe8-f217-4b02-8779-1006273d7864> | 2009-02-16 15:05:46 +0000 |
commit | 0374d53d28b227e537768417b6b7f86ab1b5ca65 (patch) | |
tree | bd014b3a2c6fcfdc92e2dfa99fce93ff97bff565 /include | |
parent | 578755d6274daf2eb0de998477960a34755c5d51 (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 'include')
-rw-r--r-- | include/configreader.h | 2 | ||||
-rw-r--r-- | include/extern.h | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/include/configreader.h b/include/configreader.h index b85bd7293..0e4700325 100644 --- a/include/configreader.h +++ b/include/configreader.h @@ -61,6 +61,8 @@ class ValueItem ValueItem(const char *); /** Initialize with an std::string */ ValueItem(const std::string &); + /** Initialize with time_t **/ + ValueItem(time_t); /** Change value to a char pointer */ //void Set(char *); /** Change value to a const char pointer */ diff --git a/include/extern.h b/include/extern.h index 06ba4cb9b..553e94ea1 100644 --- a/include/extern.h +++ b/include/extern.h @@ -630,7 +630,7 @@ E const char *merge_args(int argc, const char **argv); // Use Anope::Match() instead of these. E int match_wild(const char *pattern, const char *str) MARK_DEPRECATED; E int match_wild_nocase(const char *pattern, const char *str) MARK_DEPRECATED; -E int dotime(const char *s); +E time_t dotime(const char *s); E const char *duration(NickCore *nc, char *buf, int bufsize, time_t seconds); E const char *expire_left(NickCore *nc, char *buf, int len, time_t expires); E int doValidHost(const char *host, int type); |