summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-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.