diff options
| author | 2009-09-13 20:33:11 +0000 | |
|---|---|---|
| committer | 2009-09-13 20:33:11 +0000 | |
| commit | 2d732f4dbf4ccd22c8a4424692cc72a89ffd49b7 (patch) | |
| tree | fb1ff3f341b5ee7e801ad7ad00216a40ca131ede /src/modules/m_sslmodes.cpp | |
| parent | Prevent <include:executable> from running <include:executable> itself [jackmc... (diff) | |
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
Diffstat (limited to 'src/modules/m_sslmodes.cpp')
| -rw-r--r-- | src/modules/m_sslmodes.cpp | 13 |
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; } |
