]> git.netwichtig.de Git - user/henk/code/inspircd.git/blobdiff - include/modules.h
Add OnUserPreQuit event to allow modules to change quit messages (#1629).
[user/henk/code/inspircd.git] / include / modules.h
index 581eb7f0433c6fedce460647ae4709572003b29c..81664d3640c8ece744979e58e195ae6628a4461a 100644 (file)
@@ -214,7 +214,7 @@ enum Priority { PRIORITY_FIRST, PRIORITY_LAST, PRIORITY_BEFORE, PRIORITY_AFTER }
  */
 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,
@@ -307,6 +307,16 @@ class CoreExport Module : public classbase, public usecountbase
         */
        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