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,
*/
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
ModResult Module::OnPreCommand(std::string&, CommandBase::Params&, LocalUser*, bool) { DetachEvent(I_OnPreCommand); return MOD_RES_PASSTHRU; }
void Module::OnPostCommand(Command*, const CommandBase::Params&, LocalUser*, CmdResult, bool) { DetachEvent(I_OnPostCommand); }
void Module::OnUserInit(LocalUser*) { DetachEvent(I_OnUserInit); }
+void Module::OnUserPostInit(LocalUser*) { DetachEvent(I_OnUserPostInit); }
ModResult Module::OnCheckReady(LocalUser*) { DetachEvent(I_OnCheckReady); return MOD_RES_PASSTHRU; }
ModResult Module::OnUserRegister(LocalUser*) { DetachEvent(I_OnUserRegister); return MOD_RES_PASSTHRU; }
ModResult Module::OnUserPreKick(User*, Membership*, const std::string&) { DetachEvent(I_OnUserPreKick); return MOD_RES_PASSTHRU; }