diff options
author | attilamolnar <attilamolnar@hush.com> | 2012-10-13 16:35:19 +0200 |
---|---|---|
committer | attilamolnar <attilamolnar@hush.com> | 2012-11-29 20:26:00 +0100 |
commit | f1a122b4eeed9e681f3ef4cf94f8f710cc050afd (patch) | |
tree | 9232f1d3ac0ccce6bdf4197fe4f81480ce5abe14 /src | |
parent | 20ea635c9fcd0d559ff6fc2863ab581591bc4ef8 (diff) |
m_dnsbl Add usednsbl option to connect classes
Don't touch users in classes where it's off
Diffstat (limited to 'src')
-rw-r--r-- | src/modules/m_dnsbl.cpp | 13 |
1 files changed, 9 insertions, 4 deletions
diff --git a/src/modules/m_dnsbl.cpp b/src/modules/m_dnsbl.cpp index d7d013691..3a334ea37 100644 --- a/src/modules/m_dnsbl.cpp +++ b/src/modules/m_dnsbl.cpp @@ -352,16 +352,21 @@ class ModuleDNSBL : public Module void OnSetUserIP(LocalUser* user) { - if (user->exempt) + if ((user->exempt) || (user->client_sa.sa.sa_family != AF_INET)) return; + if (user->MyClass) + { + if (!user->MyClass->config->getBool("usednsbl", true)) + return; + } + else + ServerInstance->Logs->Log("m_dnsbl", DEBUG, "User has no connect class in OnSetUserIP"); + unsigned char a, b, c, d; char reversedipbuf[128]; std::string reversedip; - if (user->client_sa.sa.sa_family != AF_INET) - return; - d = (unsigned char) (user->client_sa.in4.sin_addr.s_addr >> 24) & 0xFF; c = (unsigned char) (user->client_sa.in4.sin_addr.s_addr >> 16) & 0xFF; b = (unsigned char) (user->client_sa.in4.sin_addr.s_addr >> 8) & 0xFF; |