X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fconfigparser.cpp;h=abdf6f3de07e2f0cb58c3f989e750bd6704445e6;hb=7b47de3c194f239c5fea09a0e49696c9af017d51;hp=e4bf4bd7197e60c4bcc19cab514a5097644570ab;hpb=cb7e83aa4ed48df3e1bb259b26737feaf5a0d676;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/configparser.cpp b/src/configparser.cpp index e4bf4bd71..abdf6f3de 100644 --- a/src/configparser.cpp +++ b/src/configparser.cpp @@ -609,14 +609,14 @@ unsigned long ConfigTag::getDuration(const std::string& key, unsigned long def, if (!readString(key, duration)) return def; - if (!InspIRCd::IsValidDuration(duration)) + unsigned long ret; + if (!InspIRCd::Duration(duration, ret)) { ServerInstance->Logs->Log("CONFIG", LOG_DEFAULT, "Value of <" + tag + ":" + key + "> at " + getTagLocation() + " is not a duration; value set to " + ConvToStr(def) + "."); return def; } - unsigned long ret = InspIRCd::Duration(duration); CheckRange(tag, key, ret, def, min, max); return ret; }