From e11ff9becf27b894c4f9a4be277239244fedc8f7 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 28 Jun 2025 13:46:51 +0100 Subject: Add flag support to rline. --- src/modules/m_rline.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/modules') 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); -- cgit v1.3.1-10-gc9f91