summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-27 17:45:14 +0000
committerom <om@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-27 17:45:14 +0000
commit330a057983a9ea7496010d32d7216b1c4c4b2181 (patch)
tree0f343fb9c83be81b05331c773a135c07f690d6f1
parent3d9969c77286f85243002dd7f6e74f0bb74f34fa (diff)
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
-rw-r--r--src/modules/m_conn_waitpong.cpp15
1 files changed, 13 insertions, 2 deletions
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()
{
}