diff options
| author | 2023-01-23 00:08:26 +0000 | |
|---|---|---|
| committer | 2023-01-23 01:01:06 +0000 | |
| commit | b5404f841552f756f6a319c5957c32ffbd3d52b9 (patch) | |
| tree | 214f804df03d7ea7994ca7ce52764f3741c61ba4 /src/modules/m_repeat.cpp | |
| parent | Move NotifyRawIO to the Log namespace. (diff) | |
| download | inspircd++-b5404f841552f756f6a319c5957c32ffbd3d52b9.tar.gz inspircd++-b5404f841552f756f6a319c5957c32ffbd3d52b9.tar.bz2 inspircd++-b5404f841552f756f6a319c5957c32ffbd3d52b9.zip | |
Move duration functions to their own header.
Diffstat (limited to 'src/modules/m_repeat.cpp')
| -rw-r--r-- | src/modules/m_repeat.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_repeat.cpp b/src/modules/m_repeat.cpp index 85953c851..33c784a5b 100644 --- a/src/modules/m_repeat.cpp +++ b/src/modules/m_repeat.cpp @@ -26,6 +26,7 @@ #include "inspircd.h" +#include "duration.h" #include "extension.h" #include "modules/exemption.h" #include "numerichelper.h" @@ -286,7 +287,7 @@ private: if ((settings.Lines = ConvToNum<unsigned int>(item)) == 0) return false; - if ((!stream.GetToken(item)) || !InspIRCd::Duration(item, settings.Seconds) || (settings.Seconds == 0)) + if ((!stream.GetToken(item)) || !Duration::TryFrom(item, settings.Seconds) || (settings.Seconds == 0)) // Required parameter missing return false; @@ -415,7 +416,7 @@ public: const std::string kickmsg = Template::Replace(rm.ms.KickMessage, { { "diff", ConvToStr(settings->Diff) }, - { "duration", InspIRCd::DurationString(settings->Seconds) }, + { "duration", Duration::ToString(settings->Seconds) }, { "lines", ConvToStr(settings->Lines) }, { "seconds", ConvToStr(settings->Seconds) }, }); |
