summaryrefslogtreecommitdiff
path: root/include/modules.h
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-02 15:02:33 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2010-02-02 15:02:33 +0000
commit8e34d66ef3bef802e5758ad73ff29e1b75aaba7f (patch)
tree2cecf2f520559630b1f6b1cac8e5654d2745b515 /include/modules.h
parent0ca1aa58d74ee743423602467cedda686e311bc1 (diff)
Add OnSetConnectClass hook for use in adding requirements to connect classes (such as requiressl)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@12352 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'include/modules.h')
-rw-r--r--include/modules.h10
1 files changed, 8 insertions, 2 deletions
diff --git a/include/modules.h b/include/modules.h
index bb9a55dbf..25c57cb61 100644
--- a/include/modules.h
+++ b/include/modules.h
@@ -97,7 +97,7 @@ struct ModResult {
/** If you change the module API in any way, increment this value.
* This MUST be a pure integer, with no parenthesis
*/
-#define API_VERSION 137
+#define API_VERSION 138
/**
* This #define allows us to call a method in all
@@ -325,7 +325,7 @@ enum Implementation
I_OnPostTopicChange, I_OnEvent, I_OnGlobalOper, I_OnPostConnect, I_OnAddBan,
I_OnDelBan, I_OnChangeLocalUserGECOS, I_OnUserRegister, I_OnChannelPreDelete, I_OnChannelDelete,
I_OnPostOper, I_OnSyncNetwork, I_OnSetAway, I_OnUserList, I_OnPostCommand, I_OnPostJoin,
- I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect,
+ I_OnWhoisLine, I_OnBuildNeighborList, I_OnGarbageCollect, I_OnSetConnectClass,
I_OnText, I_OnPassCompare, I_OnRunTestSuite, I_OnNamesListItem, I_OnNumeric, I_OnHookIO,
I_OnPreRehash, I_OnModuleRehash, I_OnSendWhoLine, I_OnChangeIdent, I_OnChannelRestrictionApply,
I_END
@@ -1255,6 +1255,12 @@ class CoreExport Module : public classbase, public usecountbase
*/
virtual void OnGarbageCollect();
+ /** Called when a user's connect class is being matched
+ * @return MOD_RES_ALLOW to force the class to match, MOD_RES_DENY to forbid it, or
+ * MOD_RES_PASSTHRU to allow normal matching (by host/port).
+ */
+ virtual ModResult OnSetConnectClass(LocalUser* user, ConnectClass* myclass);
+
/** Add test suite hooks here. These are used for testing functionality of a module
* via the --testsuite debugging parameter.
*/