From c3c97b917de8426cc0c0e9d87eda4efcfa88ef61 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 13 Jul 2024 00:38:25 +0100 Subject: Allow using /ACCEPT to override more blocking modes. --- src/modules/m_commonchans.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/m_commonchans.cpp') diff --git a/src/modules/m_commonchans.cpp b/src/modules/m_commonchans.cpp index 94314b51d..33ed4bd99 100644 --- a/src/modules/m_commonchans.cpp +++ b/src/modules/m_commonchans.cpp @@ -22,6 +22,7 @@ #include "inspircd.h" +#include "modules/callerid.h" #include "modules/ctctags.h" #include "numerichelper.h" @@ -30,6 +31,7 @@ class ModuleCommonChans final , public CTCTags::EventListener { private: + CallerID::API calleridapi; SimpleUserMode mode; bool IsExempt(User* source, User* target) @@ -40,6 +42,9 @@ private: if (source->HasPrivPermission("users/ignore-commonchans") || source->server->IsService()) return true; // Source is an oper or a service. + if (calleridapi && calleridapi->IsOnAcceptList(source, target)) + return true; // Source is on the callerid accept list + return false; } @@ -60,6 +65,7 @@ public: ModuleCommonChans() : Module(VF_VENDOR, "Adds user mode c (deaf_commonchan) which requires users to have a common channel before they can privately message each other.") , CTCTags::EventListener(this) + , calleridapi(this) , mode(this, "deaf_commonchan", 'c') { } -- cgit v1.3.1-10-gc9f91