aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2021-01-31 14:00:34 +0000
committerGravatar Sadie Powell2021-01-31 14:00:34 +0000
commit2b2d37ff506dd02f546585fa345ceb56e8007697 (patch)
tree89a4a0c472dd6855577b6e97f478b0a0806da5b2 /src/modules/m_dnsbl.cpp
parentMove sendmsglist to above the functions in LocalUser. (diff)
Make MyClass private and move everything to GetClass.
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp12
1 files changed, 2 insertions, 10 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 98b121a0d..b58b8bdc2 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -372,23 +372,15 @@ class ModuleDNSBL : public Module, public Stats::EventListener
void OnSetUserIP(LocalUser* user) override
{
- if (user->exempt || user->quitting || !DNS)
+ if (user->exempt || user->quitting || !DNS || !user->GetClass())
return;
// Clients can't be in a DNSBL if they aren't connected via IPv4 or IPv6.
if (user->client_sa.family() != AF_INET && user->client_sa.family() != AF_INET6)
return;
- if (user->MyClass)
- {
- if (!user->MyClass->config->getBool("usednsbl", true))
- return;
- }
- else
- {
- ServerInstance->Logs.Log(MODNAME, LOG_DEBUG, "User has no connect class in OnSetUserIP");
+ if (!user->GetClass()->config->getBool("usednsbl", true))
return;
- }
std::string reversedip;
if (user->client_sa.family() == AF_INET)