From 1e4d37149c3c44a479dc3440a650e433c7f1b9c2 Mon Sep 17 00:00:00 2001 From: brain Date: Wed, 20 Apr 2005 02:48:12 +0000 Subject: Added OnUserDisconnect method to modules.* to fix fd leak in m_ident.cpp git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1134 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/modules.h | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'include') diff --git a/include/modules.h b/include/modules.h index fa62c00df..150796cfe 100644 --- a/include/modules.h +++ b/include/modules.h @@ -159,9 +159,18 @@ class Module : public classbase /** Called when a user quits. * The details of the exiting user are available to you in the parameter userrec *user + * This event is only called when the user is fully registered when they quit. To catch + * raw disconnections, use the OnUserDisconnect method. */ virtual void OnUserQuit(userrec* user); + /** Called whenever a user's socket is closed. + * The details of the exiting user are available to you in the parameter userrec *user + * This event is called for all users, registered or not, as a cleanup method for modules + * which might assign resources to user, such as dns lookups, objects and sockets. + */ + virtual void OnUserDisconnect(userrec* user); + /** Called when a user joins a channel. * The details of the joining user are available to you in the parameter userrec *user, * and the details of the channel they have joined is available in the variable chanrec *channel -- cgit v1.2.3