diff options
Diffstat (limited to 'include')
-rw-r--r-- | include/modules.h | 10 | ||||
-rw-r--r-- | include/users.h | 15 |
2 files changed, 8 insertions, 17 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. */ diff --git a/include/users.h b/include/users.h index 5c3fd9a43..6b891d7da 100644 --- a/include/users.h +++ b/include/users.h @@ -92,14 +92,6 @@ struct CoreExport ConnectClass : public refcountbase */ unsigned int pingtime; - /** (Optional) Password for this line - */ - std::string pass; - - /** (Optional) Hash Method for this line - */ - std::string hash; - /** Maximum size of sendq for users in this class (bytes) * Users cannot send commands if they go over this limit */ @@ -133,10 +125,6 @@ struct CoreExport ConnectClass : public refcountbase */ unsigned int maxchans; - /** Port number this connect class applies to - */ - int port; - /** How many users may be in this connect class before they are refused? * (0 = no limit = default) */ @@ -152,11 +140,8 @@ struct CoreExport ConnectClass : public refcountbase /** Update the settings in this block to match the given block */ void Update(const ConnectClass* newSettings); - const std::string& GetName() { return name; } - const std::string& GetPass() { return pass; } const std::string& GetHost() { return host; } - const int GetPort() { return port; } /** Returns the registration timeout */ |