From 2d732f4dbf4ccd22c8a4424692cc72a89ffd49b7 Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 13 Sep 2009 20:33:11 +0000 Subject: Change match direction of extbans to allow stacking This allows you create stacked bans like: +b m:r:*bot* to mute anyone with bot in their gecos +e S:j:+#staff to allow voices in #staff to use color It also deprecates extban M, which can be implemented using m:R: git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11711 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_sslmodes.cpp | 13 ++++++++----- 1 file changed, 8 insertions(+), 5 deletions(-) (limited to 'src/modules/m_sslmodes.cpp') 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; } -- cgit v1.2.3