From 330a057983a9ea7496010d32d7216b1c4c4b2181 Mon Sep 17 00:00:00 2001 From: om Date: Fri, 27 Jan 2006 17:45:14 +0000 Subject: Readding OnUserDisconnect and actually making it do something this time :| git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2940 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_conn_waitpong.cpp | 15 +++++++++++++-- 1 file changed, 13 insertions(+), 2 deletions(-) (limited to 'src/modules') diff --git a/src/modules/m_conn_waitpong.cpp b/src/modules/m_conn_waitpong.cpp index ddbea55d0..245182536 100644 --- a/src/modules/m_conn_waitpong.cpp +++ b/src/modules/m_conn_waitpong.cpp @@ -62,7 +62,7 @@ class ModuleWaitPong : public Module void Implements(char* List) { - List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnPreCommand] = List[I_OnRehash] = 1; + List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnPreCommand] = List[I_OnRehash] = List[I_OnUserDisconnect] = 1; } virtual void OnUserRegister(userrec* user) @@ -104,7 +104,18 @@ class ModuleWaitPong : public Module { return (!user->GetExt("waitpong_pingstr")); } - + + virtual void OnUserDisconnect(userrec* user) + { + std::string* pingrpl = (std::string*)user->GetExt("waitpong_pingstr"); + + if(pingrpl) + { + delete pingrpl; + user->Shrink("waitpong_pingstr"); + } + } + virtual ~ModuleWaitPong() { } -- cgit v1.2.3