summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/modules/m_permchannels.cpp6
-rw-r--r--src/modules/m_ripemd160.cpp4
-rw-r--r--src/modules/m_services_account.cpp11
3 files changed, 12 insertions, 9 deletions
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index 0a7dc8ed9..69a282637 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -214,10 +214,12 @@ class ModulePermanentChannels : public Module
{
PermChannel p;
bool dirty;
+ bool loaded;
bool save_listmodes;
public:
- ModulePermanentChannels() : p(this), dirty(false)
+ ModulePermanentChannels()
+ : p(this), dirty(false), loaded(false)
{
}
@@ -356,8 +358,6 @@ public:
// to be able to set the modes they provide (e.g.: m_stripcolor is inited after us)
// Prioritize() is called after all module initialization is complete, consequently
// all modes are available now
-
- static bool loaded = false;
if (loaded)
return;
diff --git a/src/modules/m_ripemd160.cpp b/src/modules/m_ripemd160.cpp
index 6ceb4b481..04c27e83d 100644
--- a/src/modules/m_ripemd160.cpp
+++ b/src/modules/m_ripemd160.cpp
@@ -159,6 +159,9 @@ typedef uint32_t dword;
class RIProv : public HashProvider
{
+ /** Final hash value
+ */
+ byte hashcode[RMDsize/8];
void MDinit(dword *MDbuf, unsigned int* key)
{
@@ -416,7 +419,6 @@ class RIProv : public HashProvider
{
ServerInstance->Logs->Log("m_ripemd160", DEBUG, "RMD: '%s' length=%u", (const char*)message, length);
dword MDbuf[RMDsize/32]; /* contains (A, B, C, D(E)) */
- static byte hashcode[RMDsize/8]; /* for final hash-value */
dword X[16]; /* current 16-word chunk */
unsigned int i; /* counter */
dword nbytes; /* # of bytes not yet processed */
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;