summaryrefslogtreecommitdiff
path: root/src/userprocess.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/userprocess.cpp')
-rw-r--r--src/userprocess.cpp3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index c78f0bb0b..40fd35c59 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -66,8 +66,7 @@ void InspIRCd::DoBackgroundUserStuff()
if (!curr->lastping)
{
time_t time = this->Time() - (curr->nping - curr->MyClass->GetPingTime());
- char message[MAXBUF];
- snprintf(message, MAXBUF, "Ping timeout: %ld second%s", (long)time, time > 1 ? "s" : "");
+ const std::string message = "Ping timeout: " + ConvToStr(time) + (time == 1 ? " seconds" : " second");
curr->lastping = 1;
curr->nping = Time() + curr->MyClass->GetPingTime();
this->Users->QuitUser(curr, message);