From 8259e54d2aef9ada3cf6299424d5550f5d5f1a0c Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 1 Oct 2006 21:49:28 +0000 Subject: 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 --- src/userprocess.cpp | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'src/userprocess.cpp') 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; -- cgit v1.3.1-10-gc9f91