diff options
author | iwalkalone <iwalkalone69@users.noreply.github.com> | 2019-06-24 15:46:54 +0200 |
---|---|---|
committer | Peter Powell <petpow@saberuk.com> | 2019-06-24 14:46:54 +0100 |
commit | 2ab383f707ec648ceeb29059ce4f54d4bbb056a4 (patch) | |
tree | 1e83d48bafc205178ba20965a5a620f4d2b5b632 /include | |
parent | 871d93dc76091a273296e9a0a7ce3d411054c862 (diff) |
Add OnUserPreQuit event to allow modules to change quit messages (#1629).
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 12 |
1 files changed, 11 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h index 581eb7f04..81664d364 100644 --- a/include/modules.h +++ b/include/modules.h @@ -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 |