From eacdc9ef87b671e80f27043e021d98daa44bce92 Mon Sep 17 00:00:00 2001 From: brain Date: Thu, 14 Apr 2005 12:47:19 +0000 Subject: Added (untested!) OnCheckReady and OnUserRegister (gonna write an ident lookup module!) git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@1081 e03df62e-2008-0410-955e-edbf42e46eb7 --- include/modules.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) (limited to 'include/modules.h') diff --git a/include/modules.h b/include/modules.h index 7f4cc96be..451c939ef 100644 --- a/include/modules.h +++ b/include/modules.h @@ -395,6 +395,25 @@ class Module : public classbase * method returns, it will be passed an invalid pointer to the user object and crash!) */ virtual int OnPreCommand(std::string command, char **parameters, int pcnt, userrec *user); + + /** Called to check if a user who is connecting can now be allowed to register + * If any modules return false for this function, the user is held in the waiting + * state until all modules return true. For example a module which implements ident + * lookups will continue to return false for a user until their ident lookup is completed. + * Note that the registration timeout for a user overrides these checks, if the registration + * timeout is reached, the user is disconnected even if modules report that the user is + * not ready to connect. + */ + virtual bool OnCheckReady(userrec* user); + + /** Called whenever a user is about to register their connection (e.g. before the user + * is sent the MOTD etc). Modules can use this method if they are performing a function + * which must be done before the actual connection is completed (e.g. ident lookups, + * dnsbl lookups, etc). + * Note that you should NOT delete the user record here by causing a disconnection! + * Use OnUserConnect for that instead. + */ + virtual void OnUserRegister(userrec* user); }; -- cgit v1.2.3