]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Update hideoper for the /STATS P change in the previous commit.
authorSadie Powell <sadie@witchery.services>
Sun, 18 Apr 2021 23:51:58 +0000 (00:51 +0100)
committerSadie Powell <sadie@witchery.services>
Sun, 18 Apr 2021 23:51:58 +0000 (00:51 +0100)
src/modules/m_hideoper.cpp

index 3b64c23c4c65f39c95672a7e88e60feb483b5a2a..64872850a5c31ab19dde6354a17659181f7d75fb 100644 (file)
@@ -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++;
                        }
                }