aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_hideoper.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-04-27 10:19:35 +0100
committerGravatar Sadie Powell2021-04-27 10:37:04 +0100
commit8526836cf598b49de6fe8e1cef7a169d3de481f8 (patch)
treef9ae452b867f69c6e09913db2dd84ae3fdaba7e3 /src/modules/m_hideoper.cpp
parentUse parameter pack expansion instead of recursive calls. (diff)
parentFix SendNoticeInternal not having a NULL command variant. (diff)
Merge branch 'insp3' into master.
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 4afc8fea0..5d63e14d1 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -153,8 +153,9 @@ class ModuleHideOper
if (!oper->server->IsService() && (stats.GetSource()->IsOper() || !oper->IsModeSet(hm)))
{
LocalUser* lu = IS_LOCAL(oper);
- stats.AddRow(249, oper->nick + " (" + oper->ident + "@" + oper->GetDisplayedHost() + ") Idle: " +
- (lu ? ConvToStr(ServerInstance->Time() - lu->idle_lastmsg) + " secs" : "unavailable"));
+ const std::string idle = lu ? InspIRCd::DurationString(ServerInstance->Time() - lu->idle_lastmsg) : "unavailable";
+ stats.AddRow(249, InspIRCd::Format("%s (%s@%s) Idle: %s", oper->nick.c_str(),
+ oper->ident.c_str(), oper->GetDisplayedHost().c_str(), idle.c_str()));
count++;
}
}