From 2b2a3a31d7b6c8415edc3156a19e42b832e7a957 Mon Sep 17 00:00:00 2001 From: Sadie Powell Date: Sat, 5 Feb 2022 23:40:40 +0000 Subject: Add an option to allow channel ops to enable the permchannels mode. Closes #1964. --- src/modules/m_permchannels.cpp | 6 ++++++ 1 file changed, 6 insertions(+) (limited to 'src/modules/m_permchannels.cpp') diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index ae2fd59ad..5e4720233 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -52,6 +52,11 @@ class PermChannel : public ModeHandler return MODEACTION_ALLOW; } + + void SetOperOnly(bool value) + { + oper = value; + } }; // Not in a class due to circular dependency hell. @@ -190,6 +195,7 @@ public: ConfigTag* tag = ServerInstance->Config->ConfValue("permchanneldb"); permchannelsconf = tag->getString("filename"); save_listmodes = tag->getBool("listmodes", true); + p.SetOperOnly(tag->getBool("operonly", true)); SetInterval(tag->getDuration("saveperiod", 5)); if (!permchannelsconf.empty()) -- cgit v1.3.1-10-gc9f91