diff options
| author | 2025-03-03 14:47:35 +0000 | |
|---|---|---|
| committer | 2025-03-03 14:47:35 +0000 | |
| commit | abba3ed1e60f6d5d1f0a69460dc864cd7b2c429a (patch) | |
| tree | c386956c13ea8089964b5eeb0436f81c70bd3d67 /src/usermanager.cpp | |
| parent | Add Duration::ToHuman and update messages to use it. (diff) | |
Use Duration::ToHuman instead of seconds in various messages.
Diffstat (limited to 'src/usermanager.cpp')
| -rw-r--r-- | src/usermanager.cpp | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/src/usermanager.cpp b/src/usermanager.cpp index c6da619b8..1bdf21ec0 100644 --- a/src/usermanager.cpp +++ b/src/usermanager.cpp @@ -27,6 +27,7 @@ #include "inspircd.h" #include "clientprotocolmsg.h" #include "iohook.h" +#include "timeutils.h" #include "xline.h" namespace @@ -65,7 +66,7 @@ namespace if (!user->lastping) { time_t secs = ServerInstance->Time() - (user->nextping - user->GetClass()->pingtime); - const std::string message = INSP_FORMAT("Ping timeout: {} {}", secs, (secs != 1 ? "seconds" : "second")); + const std::string message = INSP_FORMAT("Ping timeout: {}", Duration::ToHuman(secs)); ServerInstance->Users.QuitUser(user, message); return; } |
