summaryrefslogtreecommitdiff
path: root/src/modules/m_sslmodes.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules/m_sslmodes.cpp')
-rw-r--r--src/modules/m_sslmodes.cpp13
1 files changed, 8 insertions, 5 deletions
diff --git a/src/modules/m_sslmodes.cpp b/src/modules/m_sslmodes.cpp
index b190cfc39..27a9285cc 100644
--- a/src/modules/m_sslmodes.cpp
+++ b/src/modules/m_sslmodes.cpp
@@ -101,12 +101,15 @@ class ModuleSSLModes : public Module
return MOD_RES_PASSTHRU;
}
- ModResult OnCheckBan(User *user, Channel *c)
+ ModResult OnCheckBan(User *user, Channel *c, const std::string& mask)
{
- BufferedSocketCertificateRequest req(user, this, user->GetIOHook());
- req.Send();
- if (req.cert)
- return c->GetExtBanStatus(req.cert->GetFingerprint(), 'z');
+ if (mask[0] == 'z' && mask[1] == ':')
+ {
+ BufferedSocketCertificateRequest req(user, this, user->GetIOHook());
+ req.Send();
+ if (req.cert && InspIRCd::Match(req.cert->GetFingerprint(), mask.substr(2)))
+ return MOD_RES_DENY;
+ }
return MOD_RES_PASSTHRU;
}