]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/modules/m_chanhistory.cpp
Fix m_alias not initialising 'active' before use.
[user/henk/code/inspircd.git] / src / modules / m_chanhistory.cpp
index 47e27172c4bb1c69a72feef35dacb72c7e84352c..1057e63b63338fcdb8aa48aabe98e279f17e3fb9 100644 (file)
@@ -72,8 +72,8 @@ class HistoryMode : public ParamMode<HistoryMode, SimpleExtItem<HistoryList> >
                }
 
                unsigned int len = ConvToNum<unsigned int>(parameter.substr(0, colon));
-               unsigned int time = InspIRCd::Duration(duration);
-               if (len == 0 || (len > maxlines && IS_LOCAL(source)))
+               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;