aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_hideoper.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-23 00:08:26 +0000
committerGravatar Sadie Powell2023-01-23 01:01:06 +0000
commitb5404f841552f756f6a319c5957c32ffbd3d52b9 (patch)
tree214f804df03d7ea7994ca7ce52764f3741c61ba4 /src/modules/m_hideoper.cpp
parentMove NotifyRawIO to the Log namespace. (diff)
Move duration functions to their own header.
Diffstat (limited to 'src/modules/m_hideoper.cpp')
-rw-r--r--src/modules/m_hideoper.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index a8bf2947a..b0cc76005 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -27,6 +27,7 @@
#include "inspircd.h"
+#include "duration.h"
#include "modules/stats.h"
#include "modules/who.h"
#include "modules/whois.h"
@@ -158,7 +159,7 @@ public:
std::string extra;
if (oper->IsAway())
{
- const std::string awayperiod = InspIRCd::DurationString(ServerInstance->Time() - oper->awaytime);
+ const std::string awayperiod = Duration::ToString(ServerInstance->Time() - oper->awaytime);
const std::string awaytime = InspIRCd::TimeString(oper->awaytime);
extra += InspIRCd::Format(": away for %s [since %s] (%s)", awayperiod.c_str(),
awaytime.c_str(), oper->awaymsg.c_str());
@@ -167,7 +168,7 @@ public:
auto* loper = IS_LOCAL(oper);
if (loper)
{
- const std::string idleperiod = InspIRCd::DurationString(ServerInstance->Time() - loper->idle_lastmsg);
+ const std::string idleperiod = Duration::ToString(ServerInstance->Time() - loper->idle_lastmsg);
const std::string idletime = InspIRCd::TimeString(loper->idle_lastmsg);
extra += InspIRCd::Format("%c idle for %s [since %s]", extra.empty() ? ':' : ',',
idleperiod.c_str(), idletime.c_str());