diff options
author | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-14 12:47:19 +0000 |
---|---|---|
committer | brain <brain@e03df62e-2008-0410-955e-edbf42e46eb7> | 2005-04-14 12:47:19 +0000 |
commit | eacdc9ef87b671e80f27043e021d98daa44bce92 (patch) | |
tree | 66d2e97f70cc1c2be1fceace41d8f706539e2a68 /include | |
parent | 9a3475ed584b09c221219b306611c0b691161a08 (diff) |
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
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 19 |
1 files changed, 19 insertions, 0 deletions
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); }; |