aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-06-28 13:43:25 +0100
committerGravatar Sadie Powell2025-06-28 13:43:25 +0100
commitd2448659a71456135e3a3c61bdc4274a302f014e (patch)
tree5d33546256724947140b594a329861aec33fc5c6
parentAdd an OpenRC init script. (diff)
Minor style nits in the rline module.
-rw-r--r--src/modules/m_rline.cpp23
1 files changed, 13 insertions, 10 deletions
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp
index 12c4548d4..67a3aa523 100644
--- a/src/modules/m_rline.cpp
+++ b/src/modules/m_rline.cpp
@@ -31,8 +31,11 @@
#include "timeutils.h"
#include "xline.h"
-static bool ZlineOnMatch = false;
-static bool added_zline = false;
+namespace
+{
+ bool addedzline = false;
+ bool zlineonmatch = false;
+}
class RLine final
: public XLine
@@ -66,7 +69,7 @@ public:
void Apply(User* u) override
{
- if (ZlineOnMatch)
+ if (zlineonmatch)
{
auto* zl = new ZLine(ServerInstance->Time(), duration ? expiry - ServerInstance->Time() : 0, MODNAME "@" + ServerInstance->Config->ServerName, reason, u->GetAddress());
if (ServerInstance->XLines->AddLine(zl, nullptr))
@@ -82,7 +85,7 @@ public:
zl->source, u->GetAddress(), Duration::ToLongString(zl->duration),
Time::ToString(zl->duration), zl->reason);
}
- added_zline = true;
+ addedzline = true;
}
else
delete zl;
@@ -220,7 +223,7 @@ private:
Regex::EngineReference rxfactory;
RLineFactory f;
CommandRLine r;
- bool MatchOnNickChange;
+ bool matchonnickchange;
bool initing = true;
Regex::Engine* factory;
@@ -274,8 +277,8 @@ public:
{
const auto& tag = ServerInstance->Config->ConfValue("rline");
- MatchOnNickChange = tag->getBool("matchonnickchange");
- ZlineOnMatch = tag->getBool("zlineonmatch");
+ matchonnickchange = tag->getBool("matchonnickchange");
+ zlineonmatch = tag->getBool("zlineonmatch");
std::string newrxengine = tag->getString("engine");
factory = rxfactory ? (rxfactory.operator->()) : nullptr;
@@ -313,7 +316,7 @@ public:
if (!IS_LOCAL(user))
return;
- if (!MatchOnNickChange)
+ if (!matchonnickchange)
return;
XLine* rl = ServerInstance->XLines->MatchesLine("R", user);
@@ -327,9 +330,9 @@ public:
void OnBackgroundTimer(time_t curtime) override
{
- if (added_zline)
+ if (addedzline)
{
- added_zline = false;
+ addedzline = false;
ServerInstance->XLines->ApplyLines();
}
}