aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_hideoper.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-03-03 18:17:21 +0000
committerGravatar Sadie Powell2025-03-03 18:19:49 +0000
commit205603cadf80ccd6cd9757455957b1f7c3a843be (patch)
tree3bbd021c7d40b862d3c339141dfbf17c0f5e6dd5 /src/modules/m_hideoper.cpp
parentUse Duration::ToHuman instead of seconds in various messages. (diff)
Add an flag to ToHuman to shorten the output.
Diffstat (limited to 'src/modules/m_hideoper.cpp')
-rw-r--r--src/modules/m_hideoper.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/modules/m_hideoper.cpp b/src/modules/m_hideoper.cpp
index 786c962fe..ea2143fe7 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -157,7 +157,7 @@ public:
std::string extra;
if (oper->IsAway())
{
- const std::string awayperiod = Duration::ToHuman(ServerInstance->Time() - oper->away->time);
+ const std::string awayperiod = Duration::ToHuman(ServerInstance->Time() - oper->away->time, true);
const std::string awaytime = Time::ToString(oper->away->time);
extra = INSP_FORMAT(": away for {} [since {}] ({})", awayperiod, awaytime, oper->away->message);
@@ -166,7 +166,7 @@ public:
auto* loper = IS_LOCAL(oper);
if (loper)
{
- const std::string idleperiod = Duration::ToHuman(ServerInstance->Time() - loper->idle_lastmsg);
+ const std::string idleperiod = Duration::ToHuman(ServerInstance->Time() - loper->idle_lastmsg, true);
const std::string idletime = Time::ToString(loper->idle_lastmsg);
extra += INSP_FORMAT("{} idle for {} [since {}]", extra.empty() ? ':' : ',', idleperiod, idletime);