diff options
-rw-r--r-- | src/helperfuncs.cpp | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/src/helperfuncs.cpp b/src/helperfuncs.cpp index 386d6dafc..70ac2f0e6 100644 --- a/src/helperfuncs.cpp +++ b/src/helperfuncs.cpp @@ -432,6 +432,9 @@ bool InspIRCd::IsValidDuration(const std::string& duration) std::string InspIRCd::DurationString(time_t duration) { + if (duration == 0) + return "0s"; + time_t years = duration / 31449600; time_t weeks = (duration / 604800) % 52; time_t days = (duration / 86400) % 7; |