From a584474bd9b4f62b9da9f44e1f083f378970e43c Mon Sep 17 00:00:00 2001 From: w00t Date: Mon, 2 Oct 2006 00:31:45 +0000 Subject: Use a ternary operator to remove bracketing from ping timeout message git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5383 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 7bc287265..cb204989d 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -294,8 +294,8 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME) if (!curr->lastping) { /* Everybody loves boobies. */ - std::string time = ConvToStr(this->Time() - (curr->nping - curr->pingmax)); - std::string boobies = "Ping timeout: " + time + " second(s)"; + time_t time = this->Time() - (curr->nping - curr->pingmax); + std::string boobies = "Ping timeout: " + ConvToStr(time) + " second" + (time > 1 ? "s" : ""); GlobalGoners.AddItem(curr, boobies); curr->lastping = 1; curr->nping = TIME+curr->pingmax; -- cgit v1.2.3