From 0374d53d28b227e537768417b6b7f86ab1b5ca65 Mon Sep 17 00:00:00 2001 From: rburchell Date: Mon, 16 Feb 2009 15:05:46 +0000 Subject: 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 --- include/configreader.h | 2 ++ include/extern.h | 2 +- 2 files changed, 3 insertions(+), 1 deletion(-) (limited to 'include') 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); -- cgit