From abec4e1e7c76cb8fa1b324d9ca743e7d687a9b09 Mon Sep 17 00:00:00 2001 From: w00t Date: Sun, 1 Oct 2006 14:10:48 +0000 Subject: InspIRCd: Now with 100% more boobies. Err, ping timeout message coolness. git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@5365 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/userprocess.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/userprocess.cpp b/src/userprocess.cpp index 10da15292..49a5adcca 100644 --- a/src/userprocess.cpp +++ b/src/userprocess.cpp @@ -293,7 +293,9 @@ void InspIRCd::DoBackgroundUserStuff(time_t TIME) // This user didn't answer the last ping, remove them if (!curr->lastping) { - GlobalGoners.AddItem(curr,"Ping timeout"); + time_t last_activity = curr->nping - curr->pingmax; + std::string boobies = "Ping timeout: " + ConvToStr(last_activity <= 0 ? curr->pingmax : last_activity) + " second(s)"; + GlobalGoners.AddItem(curr, boobies); curr->lastping = 1; curr->nping = TIME+curr->pingmax; continue; -- cgit v1.2.3