aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_ident.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2023-01-08 16:12:43 +0000
committerGravatar Sadie Powell2023-01-08 16:28:40 +0000
commit8831595e1a5306f4204fedc6ecbc4a3c9299fb35 (patch)
treef9f27322d35d199240dfeca82415ec94724f2ff9 /src/modules/m_ident.cpp
parentSwitch sqloper to use a local user lookup instead of IS_LOCAL. (diff)
Rework how users are assigned to connect classes.
- Move core connect class checks and <performance:clonesonconnect> to the core_user module. - Add pre-change and post-change events for when a connect class changes. - Split explicit class changing out into its own method. - Remove the need to almost always call CheckClass after SetClass. - Add use counting to the connect class instead of relying on the shared_ptr use count.
Diffstat (limited to 'src/modules/m_ident.cpp')
-rw-r--r--src/modules/m_ident.cpp8
1 files changed, 4 insertions, 4 deletions
diff --git a/src/modules/m_ident.cpp b/src/modules/m_ident.cpp
index 72db6d399..d6c96e3e6 100644
--- a/src/modules/m_ident.cpp
+++ b/src/modules/m_ident.cpp
@@ -404,12 +404,12 @@ public:
return MOD_RES_PASSTHRU;
}
- ModResult OnSetConnectClass(LocalUser* user, const ConnectClass::Ptr& myclass) override
+ ModResult OnPreChangeConnectClass(LocalUser* user, const std::shared_ptr<ConnectClass>& klass) override
{
- if (myclass->config->getBool("requireident") && state.Get(user) != IDENT_FOUND)
+ if (klass->config->getBool("requireident") && state.Get(user) != IDENT_FOUND)
{
- ServerInstance->Logs.Debug("CONNECTCLASS", "The %s connect class is not suitable as it requires an identd response",
- myclass->GetName().c_str());
+ ServerInstance->Logs.Debug("CONNECTCLASS", "The %s connect class is not suitable as it requires an identd response.",
+ klass->GetName().c_str());
return MOD_RES_DENY;
}
return MOD_RES_PASSTHRU;