summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2012-10-03 02:37:05 +0200
committerattilamolnar <attilamolnar@hush.com>2012-10-03 03:22:14 +0200
commitb5b17f22e98ce06bc639edede60784bb1988a9e5 (patch)
tree4d07f2f6fe57d2db84a3c3b95e1451d98c7e8dd1
parentc25fc2cacc957d0defc2901b9a1e5a174a270ecb (diff)
m_services_account Fix possible recursion when checking 'U' extbans
-rw-r--r--src/modules/m_services_account.cpp10
1 files changed, 9 insertions, 1 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index 08986d53c..ac5338332 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -209,6 +209,10 @@ class ModuleServicesAccount : public Module
ModResult OnCheckBan(User* user, Channel* chan, const std::string& mask)
{
+ static bool checking = false;
+ if (checking)
+ return MOD_RES_PASSTHRU;
+
if (mask[1] == ':')
{
if (mask[0] == 'R')
@@ -226,7 +230,11 @@ class ModuleServicesAccount : public Module
/* If we made it this far we know the user isn't registered
so just deny if it matches */
- if (chan->GetExtBanStatus(user, 'U') == MOD_RES_DENY)
+ checking = true;
+ bool result = chan->CheckBan(user, mask.substr(2));
+ checking = false;
+
+ if (result)
return MOD_RES_DENY;
}
}