From: Attila Molnar Date: Wed, 28 May 2014 12:01:00 +0000 (+0200) Subject: m_ident Close the ident socket when the object is culled instead of using hooks X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;ds=inline;h=41c5e43ff2e50131778714c1f4ce5d04adb82fa9;p=user%2Fhenk%2Fcode%2Finspircd.git m_ident Close the ident socket when the object is culled instead of using hooks --- diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp index b86ed2cbe..3e87b8c5a 100644 --- a/src/modules/m_ident.cpp +++ b/src/modules/m_ident.cpp @@ -263,6 +263,12 @@ class IdentRequestSocket : public EventHandler } } } + + CullResult cull() CXX11_OVERRIDE + { + Close(); + return EventHandler::cull(); + } }; class ModuleIdent : public Module @@ -360,28 +366,6 @@ class ModuleIdent : public Module return MOD_RES_DENY; return MOD_RES_PASSTHRU; } - - void OnCleanup(int target_type, void *item) CXX11_OVERRIDE - { - /* Module unloading, tidy up users */ - if (target_type == TYPE_USER) - { - LocalUser* user = IS_LOCAL((User*) item); - if (user) - OnUserDisconnect(user); - } - } - - void OnUserDisconnect(LocalUser *user) CXX11_OVERRIDE - { - /* User disconnect (generic socket detatch event) */ - IdentRequestSocket *isock = ext.get(user); - if (isock) - { - isock->Close(); - ext.unset(user); - } - } }; MODULE_INIT(ModuleIdent)