summaryrefslogtreecommitdiff
path: root/src/modules/m_dnsbl.cpp
diff options
context:
space:
mode:
authorSadie Powell <sadie@witchery.services>2020-11-19 19:21:10 +0000
committerSadie Powell <sadie@witchery.services>2020-11-20 12:10:47 +0000
commitd4685e02b55229e0ca5068b839c87b5a80180f33 (patch)
tree76a9f59f6d9b103eb63397ceb26c8245b15b6a5f /src/modules/m_dnsbl.cpp
parentcc5965c45d2bccb6bd440aafb6bebfb98520ddd6 (diff)
Avoid doing "IP changed" event stuff on quitting users.
Diffstat (limited to 'src/modules/m_dnsbl.cpp')
-rw-r--r--src/modules/m_dnsbl.cpp5
1 files changed, 4 insertions, 1 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp
index 4873e2322..37819c05c 100644
--- a/src/modules/m_dnsbl.cpp
+++ b/src/modules/m_dnsbl.cpp
@@ -357,7 +357,7 @@ class ModuleDNSBL : public Module, public Stats::EventListener
void OnSetUserIP(LocalUser* user) CXX11_OVERRIDE
{
- if ((user->exempt) || !DNS)
+ if (user->exempt || user->quitting || !DNS)
return;
// Clients can't be in a DNSBL if they aren't connected via IPv4 or IPv6.
@@ -370,7 +370,10 @@ class ModuleDNSBL : public Module, public Stats::EventListener
return;
}
else
+ {
ServerInstance->Logs->Log(MODNAME, LOG_DEBUG, "User has no connect class in OnSetUserIP");
+ return;
+ }
std::string reversedip;
if (user->client_sa.family() == AF_INET)