summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-04-03 15:25:00 +0100
committerPeter Powell <petpow@saberuk.com>2019-04-04 12:27:56 +0100
commitbe0c809590635fc53fa11ca05ba974699b9ec1b6 (patch)
treeccd2c1539e42d686546e0515a2c4c807126415bc /include/modules.h
parent9ea8ecfaf395955a4e58c743c2f9e35a26528039 (diff)
Document OnUserInit properly and add OnUserPostInit.
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h15
1 files changed, 12 insertions, 3 deletions
diff --git a/include/modules.h b/include/modules.h
index de418a785..ebb3c63b4 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -216,7 +216,7 @@ enum Implementation
I_OnSendSnotice, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper,
I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNick,
I_OnUserPostMessage, I_OnUserMessageBlocked, I_OnMode,
- I_OnDecodeMetaData, I_OnAcceptConnection, I_OnUserInit,
+ I_OnDecodeMetaData, I_OnAcceptConnection, I_OnUserInit, I_OnUserPostInit,
I_OnChangeHost, I_OnChangeRealName, I_OnAddLine, I_OnDelLine, I_OnExpireLine,
I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnLoadModule,
I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite,
@@ -722,11 +722,20 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnPostCommand(Command* command, const CommandBase::Params& parameters, LocalUser* user, CmdResult result, bool loop);
- /** Called when a user is first connecting, prior to starting DNS lookups, checking initial
- * connect class, or accepting any commands.
+ /** Called after a user object is initialised and added to the user list.
+ * When this is called the user has not their I/O hooks checked or had their initial
+ * connect class assigned and may not yet have a serialiser. You probably want to use
+ * the OnUserPostInit or OnUserSetIP hooks instead of this one.
+ * @param user The connecting user.
*/
virtual void OnUserInit(LocalUser* user);
+ /** Called after a user object has had their I/O hooks checked, their initial connection
+ * class assigned, and had a serialiser set.
+ * @param user The connecting user.
+ */
+ virtual void OnUserPostInit(LocalUser* 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