summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-01 21:49:28 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2006-10-01 21:49:28 +0000
commit8259e54d2aef9ada3cf6299424d5550f5d5f1a0c (patch)
treee355a98644639ccf3101e6ca55e39aab14e199f3
parentcbce82c3ca4a3ee5d477fab305d9aefc0b8383af (diff)
Fix ping timeout messages. This is what I get for not fully testing.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5377 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/userprocess.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index 1a5d7f2f7..7bc287265 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -293,9 +293,9 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME)
// This user didn't answer the last ping, remove them
if (!curr->lastping)
{
- time_t last_activity = curr->nping - curr->pingmax;
/* Everybody loves boobies. */
- std::string boobies = "Ping timeout: " + ConvToStr(last_activity <= 0 ? curr->pingmax : last_activity) + " second(s)";
+ std::string time = ConvToStr(this->Time() - (curr->nping - curr->pingmax));
+ std::string boobies = "Ping timeout: " + time + " second(s)";
GlobalGoners.AddItem(curr, boobies);
curr->lastping = 1;
curr->nping = TIME+curr->pingmax;