diff options
Diffstat (limited to 'src/modules/m_repeat.cpp')
-rw-r--r-- | src/modules/m_repeat.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index bd4206166..a8dd49e2d 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -34,7 +34,7 @@ class ChannelSettings unsigned int Backlog; unsigned int Lines; unsigned int Diff; - unsigned int Seconds; + unsigned long Seconds; void serialize(std::string& out) const { @@ -277,7 +277,10 @@ class RepeatMode : public ParamMode<RepeatMode, SimpleExtItem<ChannelSettings> > if ((settings.Lines = ConvToNum<unsigned int>(item)) == 0) return false; - if ((!stream.GetToken(item)) || ((settings.Seconds = InspIRCd::Duration(item)) == 0)) + if (!InspIRCd::Duration(item, settings.Seconds)) + return false; + + if ((!stream.GetToken(item)) || (settings.Seconds == 0)) // Required parameter missing return false; |