diff options
author | Peter Powell <petpow@saberuk.com> | 2018-11-24 23:27:16 +0000 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2018-11-24 23:27:16 +0000 |
commit | cc5aff3e5a7d83eb0154faf1540fc74959a6f0e5 (patch) | |
tree | 10851e87ec7b97f9aa53d77e4f941f4b84855e27 /include/inspircd.h | |
parent | 6596fb5ffea7a23827c994168ca1611918857af6 (diff) |
Move IsValidDuration into the core.
Diffstat (limited to 'include/inspircd.h')
-rw-r--r-- | include/inspircd.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/inspircd.h b/include/inspircd.h index 1e0ca1925..a563edc7f 100644 --- a/include/inspircd.h +++ b/include/inspircd.h @@ -502,6 +502,12 @@ class CoreExport InspIRCd */ static unsigned long Duration(const std::string& str); + /** Determines whether a string contains a valid duration. + * @param str A string containing a time in the form 1y2w3d4h6m5s + * @return True if the string is a valid duration; otherwise, false. + */ + static bool IsValidDuration(const std::string& str); + /** Attempt to compare a password to a string from the config file. * This will be passed to handling modules which will compare the data * against possible hashed equivalents in the input string. |