X-Git-Url: https://git.netwichtig.de/gitweb/?a=blobdiff_plain;f=src%2Fmodules%2Fm_chanhistory.cpp;h=1057e63b63338fcdb8aa48aabe98e279f17e3fb9;hb=9b25df31096f889e3653ab100493133014d4fe73;hp=08f4291c916c73b452a484a342a69b219c7d2e76;hpb=cc5aff3e5a7d83eb0154faf1540fc74959a6f0e5;p=user%2Fhenk%2Fcode%2Finspircd.git diff --git a/src/modules/m_chanhistory.cpp b/src/modules/m_chanhistory.cpp index 08f4291c9..1057e63b6 100644 --- a/src/modules/m_chanhistory.cpp +++ b/src/modules/m_chanhistory.cpp @@ -71,9 +71,9 @@ class HistoryMode : public ParamMode > return MODEACTION_DENY; } - unsigned int len = ConvToInt(parameter.substr(0, colon)); - unsigned int time = InspIRCd::Duration(duration); - if (len == 0 || (len > maxlines && IS_LOCAL(source))) + unsigned int len = ConvToNum(parameter.substr(0, colon)); + unsigned long time; + if (!InspIRCd::Duration(duration, time) || len == 0 || (len > maxlines && IS_LOCAL(source))) { source->WriteNumeric(Numerics::InvalidModeParameter(channel, this, parameter)); return MODEACTION_DENY;