]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - src/coremods/core_stats.cpp
Update copyright headers.
[user/henk/code/inspircd.git] / src / coremods / core_stats.cpp
index 19e429a95e92089924cc590e47ea39f69b791116..0778a13febb941d5e7a6aa0522af18389bea0b10 100644 (file)
@@ -3,7 +3,7 @@
  *
  *   Copyright (C) 2018 Puck Meerburg <puck@puckipedia.com>
  *   Copyright (C) 2018 Dylan Frank <b00mx0r@aureus.pw>
- *   Copyright (C) 2016-2020 Sadie Powell <sadie@witchery.services>
+ *   Copyright (C) 2016-2021 Sadie Powell <sadie@witchery.services>
  *   Copyright (C) 2012-2016 Attila Molnar <attilamolnar@hush.com>
  *   Copyright (C) 2012, 2019 Robby <robby@chatbelgie.be>
  *   Copyright (C) 2012 ChrisTX <xpipe@hotmail.de>
@@ -196,8 +196,9 @@ void CommandStats::DoStats(Stats::Context& stats)
                                if (!oper->server->IsULine())
                                {
                                        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()));
                                        idx++;
                                }
                        }