summaryrefslogtreecommitdiff
path: root/src/modules/m_services_account.cpp
diff options
context:
space:
mode:
authorattilamolnar <attilamolnar@hush.com>2013-09-15 16:54:34 +0200
committerattilamolnar <attilamolnar@hush.com>2013-09-15 16:54:34 +0200
commitb8440f4a023069e31f0af75dd9c15af3c3f9a26c (patch)
tree5f6869ea0f328e114338121cc2bd2f46d7a6e247 /src/modules/m_services_account.cpp
parentd743bdf338d63e032f3ecb8518e00ea4ff1345ed (diff)
Work around STB_GNU_UNIQUE symbols not allowing module unmap
Diffstat (limited to 'src/modules/m_services_account.cpp')
-rw-r--r--src/modules/m_services_account.cpp11
1 files changed, 6 insertions, 5 deletions
diff --git a/src/modules/m_services_account.cpp b/src/modules/m_services_account.cpp
index cb3f089c6..a139087a5 100644
--- a/src/modules/m_services_account.cpp
+++ b/src/modules/m_services_account.cpp
@@ -112,9 +112,11 @@ class ModuleServicesAccount : public Module
Channel_r m4;
User_r m5;
AccountExtItem accountname;
+ bool checking_ban;
+
public:
ModuleServicesAccount() : m1(this), m2(this), m3(this), m4(this), m5(this),
- accountname("accountname", this)
+ accountname("accountname", this), checking_ban(false)
{
}
@@ -199,8 +201,7 @@ class ModuleServicesAccount : public Module
ModResult OnCheckBan(User* user, Channel* chan, const std::string& mask)
{
- static bool checking = false;
- if (checking)
+ if (checking_ban)
return MOD_RES_PASSTHRU;
if ((mask.length() > 2) && (mask[1] == ':'))
@@ -220,9 +221,9 @@ class ModuleServicesAccount : public Module
/* If we made it this far we know the user isn't registered
so just deny if it matches */
- checking = true;
+ checking_ban = true;
bool result = chan->CheckBan(user, mask.substr(2));
- checking = false;
+ checking_ban = false;
if (result)
return MOD_RES_DENY;