*/
enum Implementation
{
- I_OnUserConnect, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart,
+ I_OnUserConnect, I_OnUserPreQuit, I_OnUserQuit, I_OnUserDisconnect, I_OnUserJoin, I_OnUserPart,
I_OnSendSnotice, I_OnUserPreJoin, I_OnUserPreKick, I_OnUserKick, I_OnOper,
I_OnUserPreInvite, I_OnUserInvite, I_OnUserPreMessage, I_OnUserPreNick,
I_OnUserPostMessage, I_OnUserMessageBlocked, I_OnMode,
*/
virtual void OnUserConnect(LocalUser* user);
+ /** Called when before a user quits.
+ * The details of the exiting user are available to you in the parameter User *user
+ * This event is only called when the user is fully registered when they quit. To catch
+ * raw disconnections, use the OnUserDisconnect method.
+ * @param user The user who is quitting
+ * @param message The user's quit message (as seen by non-opers)
+ * @param oper_message The user's quit message (as seen by opers)
+ */
+ virtual ModResult OnUserPreQuit(LocalUser* user, std::string& message, std::string& oper_message);
+
/** Called when a user quits.
* The details of the exiting user are available to you in the parameter User *user
* This event is only called when the user is fully registered when they quit. To catch