summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorPeter Powell <petpow@saberuk.com>2019-07-21 13:44:32 +0100
committerPeter Powell <petpow@saberuk.com>2019-07-21 13:50:01 +0100
commit850b7a3ace862101a944a9332d72b6bd597c17cc (patch)
treea5b5e204de40f29942795cdffaec18037ccf16f1 /include
parente2fcf7b3b15f86fec250b7b784bdf3d0631048c6 (diff)
Allow modules to prevent a failed connection from being closed.
Diffstat (limited to 'include')
-rw-r--r--include/modules.h10
1 files changed, 9 insertions, 1 deletions
diff --git a/include/modules.h b/include/modules.h
index 81664d364..f5af969de 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -223,7 +223,7 @@ enum Implementation
I_OnUserPostNick, I_OnPreMode, I_On005Numeric, I_OnKill, I_OnLoadModule,
I_OnUnloadModule, I_OnBackgroundTimer, I_OnPreCommand, I_OnCheckReady, I_OnCheckInvite,
I_OnRawMode, I_OnCheckKey, I_OnCheckLimit, I_OnCheckBan, I_OnCheckChannelBan, I_OnExtBanCheck,
- I_OnPreChangeHost, I_OnPreTopicChange,
+ I_OnPreChangeHost, I_OnPreTopicChange, I_OnConnectionFail,
I_OnPostTopicChange, I_OnPostConnect, I_OnPostDeoper,
I_OnPreChangeRealName, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete,
I_OnPostOper, I_OnPostCommand, I_OnPostJoin,
@@ -942,6 +942,14 @@ class CoreExport Module : public classbase, public usecountbase
* deny the message from being sent, or MOD_RES_PASSTHRU to let another module handle the event.
*/
virtual ModResult OnUserWrite(LocalUser* user, ClientProtocol::Message& msg);
+
+ /** Called when a user connection has been unexpectedly disconnected.
+ * @param user The user who has been unexpectedly disconnected.
+ * @param error The type of error which caused this connection failure.
+ * @return MOD_RES_ALLOW to explicitly retain the user as a zombie, MOD_RES_DENY to explicitly
+ * disconnect the user, or MOD_RES_PASSTHRU to let another module handle the event.
+ */
+ virtual ModResult OnConnectionFail(LocalUser* user, BufferedSocketError error);
};
/** ModuleManager takes care of all things module-related