From 8199f4dd3e64450d464c0ac97b34d90c165df066 Mon Sep 17 00:00:00 2001 From: brain Date: Sun, 1 Jul 2007 12:06:15 +0000 Subject: Optimizations and code tidyups. QA please check that svsnick and other forced nick changes still work right after this git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@7416 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/userprocess.cpp') diff --git a/src/userprocess.cpp b/src/userprocess.cpp index e79c879c2..36523e522 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -274,9 +274,10 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME) { /* Everybody loves boobies. */ time_t time = this->Time(false) - (curr->nping - curr->pingmax); - std::string boobies = "Ping timeout: " + ConvToStr(time) + " second" + (time > 1 ? "s" : ""); + char message[MAXBUF]; + snprintf(message, MAXBUF, "Ping timeout: %d second%s", time, time > 1 ? "s" : ""); curr->muted = true; - GlobalCulls.AddItem(curr, boobies); + GlobalCulls.AddItem(curr, message); curr->lastping = 1; curr->nping = TIME+curr->pingmax; continue; -- cgit v1.2.3