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_shun.cpp | |
| parent | Move NotifyRawIO to the Log namespace. (diff) | |
Move duration functions to their own header.
Diffstat (limited to 'src/modules/m_shun.cpp')
| -rw-r--r-- | src/modules/m_shun.cpp | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/src/modules/m_shun.cpp b/src/modules/m_shun.cpp index 339345e5d..d36e06c22 100644 --- a/src/modules/m_shun.cpp +++ b/src/modules/m_shun.cpp @@ -30,9 +30,10 @@ #include "inspircd.h" -#include "xline.h" +#include "duration.h" #include "modules/shun.h" #include "modules/stats.h" +#include "xline.h" /** An XLineFactory specialized to generate shun pointers */ @@ -103,7 +104,7 @@ public: std::string expr; if (parameters.size() > 2) { - if (!InspIRCd::Duration(parameters[1], duration)) + if (!Duration::TryFrom(parameters[1], duration)) { user->WriteNotice("*** Invalid duration for SHUN."); return CmdResult::FAILURE; @@ -127,7 +128,7 @@ public: else { ServerInstance->SNO.WriteToSnoMask('x', "%s added a timed SHUN on %s, expires in %s (on %s): %s", - user->nick.c_str(), target.c_str(), InspIRCd::DurationString(duration).c_str(), + user->nick.c_str(), target.c_str(), Duration::ToString(duration).c_str(), InspIRCd::TimeString(ServerInstance->Time() + duration).c_str(), expr.c_str()); } } |
