aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_rline.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2025-06-28 13:46:51 +0100
committerGravatar Sadie Powell2025-06-28 13:48:05 +0100
commite11ff9becf27b894c4f9a4be277239244fedc8f7 (patch)
treedeea527395976bc54dcf1dee11d8f4b404851acc /src/modules/m_rline.cpp
parentMinor style nits in the rline module. (diff)
Add flag support to rline.
Diffstat (limited to 'src/modules/m_rline.cpp')
-rw-r--r--src/modules/m_rline.cpp6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/modules/m_rline.cpp b/src/modules/m_rline.cpp
index 67a3aa523..0c5be74e9 100644
--- a/src/modules/m_rline.cpp
+++ b/src/modules/m_rline.cpp
@@ -34,6 +34,7 @@
namespace
{
bool addedzline = false;
+ bool useflags = false;
bool zlineonmatch = false;
}
@@ -48,7 +49,7 @@ public:
/* This can throw on failure, but if it does we DONT catch it here, we catch it and display it
* where the object is created, we might not ALWAYS want it to output stuff to snomask x all the time
*/
- regex = rxfactory->Create(regexs);
+ regex = useflags ? rxfactory->Create(regexs) : rxfactory->CreateHuman(regexs);
}
bool Matches(User* u) const override
@@ -278,9 +279,10 @@ public:
const auto& tag = ServerInstance->Config->ConfValue("rline");
matchonnickchange = tag->getBool("matchonnickchange");
+ useflags = tag->getBool("useflags");
zlineonmatch = tag->getBool("zlineonmatch");
- std::string newrxengine = tag->getString("engine");
+ std::string newrxengine = tag->getString("engine");
factory = rxfactory ? (rxfactory.operator->()) : nullptr;
rxfactory.SetEngine(newrxengine);