From: Sadie Powell Date: Sun, 18 Apr 2021 23:51:58 +0000 (+0100) Subject: Update hideoper for the /STATS P change in the previous commit. X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=033127f583ba344dfe2306f37325ef3987fd42e3;p=user%2Fhenk%2Fcode%2Finspircd.git Update hideoper for the /STATS P change in the previous commit. --- 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++; } }