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_setidle.cpp | |
| parent | Move NotifyRawIO to the Log namespace. (diff) | |
Move duration functions to their own header.
Diffstat (limited to 'src/modules/m_setidle.cpp')
| -rw-r--r-- | src/modules/m_setidle.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/modules/m_setidle.cpp b/src/modules/m_setidle.cpp index 19a77e6eb..7ed952266 100644 --- a/src/modules/m_setidle.cpp +++ b/src/modules/m_setidle.cpp @@ -26,6 +26,7 @@ #include "inspircd.h" +#include "duration.h" #include "modules/ircv3_replies.h" class CommandSetidle final @@ -50,7 +51,7 @@ public: CmdResult HandleLocal(LocalUser* user, const Params& parameters) override { unsigned long idle; - if (!InspIRCd::Duration(parameters[0], idle)) + if (!Duration::TryFrom(parameters[0], idle)) { failrpl.SendIfCap(user, stdrplcap, this, "INVALID_IDLE_TIME", parameters[0], "Invalid idle time."); return CmdResult::FAILURE; |
