diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-02 00:31:45 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2006-10-02 00:31:45 +0000 |
commit | a584474bd9b4f62b9da9f44e1f083f378970e43c (patch) | |
tree | 88fe9f8c69792fee3473d20f4ea35f959fe6c3f3 | |
parent | 8fd3aeae0c069390895f53887744fdb37ab6f3ca (diff) |
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
-rw-r--r-- | src/userprocess.cpp | 4 |
1 files 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; |