summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2021-04-19 00:51:58 +0100
committerSadie Powell <sadie@witchery.services>2021-04-19 00:51:58 +0100
commit033127f583ba344dfe2306f37325ef3987fd42e3 (patch)
tree1e29e7ef50624c536bffcdcf8c041373849c7548 /src/modules
parent6b188f1d4ebd00c1e93a0a4ac68af04de0bbaeab (diff)
Update hideoper for the /STATS P change in the previous commit.
Diffstat (limited to 'src/modules')
-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 3b64c23c4..64872850a 100644
--- a/src/modules/m_hideoper.cpp
+++ b/src/modules/m_hideoper.cpp
@@ -160,8 +160,9 @@ class ModuleHideOper
if (!oper->server->IsULine() && (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++;
}
}