summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-27 18:00:08 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2006-01-27 18:00:08 +0000
commitc09d93ab221458b6327c4ec556b83d7f1fdf550b (patch)
tree2a0895484c3be7898b61e5b3289a0b53dd9b5278 /src
parent74c6e4d21cb2566be749db330679fe34376ef69a (diff)
Added OnCleanup
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@2942 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_ident.cpp15
1 files changed, 14 insertions, 1 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 3bffa388b..1b92b07db 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -144,7 +144,7 @@ class ModuleIdent : public Module
void Implements(char* List)
{
- List[I_OnRehash] = List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnUserDisconnect] = 1;
+ List[I_OnCleanup] = List[I_OnRehash] = List[I_OnUserRegister] = List[I_OnCheckReady] = List[I_OnUserDisconnect] = 1;
}
virtual void OnRehash(std::string parameter)
@@ -173,6 +173,19 @@ class ModuleIdent : public Module
return (!ident);
}
+ virtual void OnCleanup(int target_type, void* item)
+ {
+ if (target_type == TYPE_USER)
+ {
+ userrec* user = (userrec*)item;
+ RFC1413* ident = (RFC1413*)user->GetExt("ident_data");
+ if (ident)
+ {
+ Srv->RemoveSocket(ident);
+ }
+ }
+ }
+
virtual void OnUserDisconnect(userrec* user)
{
// when the user quits tidy up any ident lookup they have pending to keep things tidy.