summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-20 02:48:12 +0000
committerbrain <brain@e03df62e-2008-0410-955e-edbf42e46eb7>2005-04-20 02:48:12 +0000
commit1e4d37149c3c44a479dc3440a650e433c7f1b9c2 (patch)
tree5001350220a145beee03f9f048aa01094c128f53 /include
parent4f62aeb27ebf1cb142d34121defe1a47e8a17444 (diff)
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
Diffstat (limited to 'include')
-rw-r--r--include/modules.h9
1 files changed, 9 insertions, 0 deletions
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