aboutsummaryrefslogtreecommitdiff
path: root/src/modules/m_permchannels.cpp
diff options
context:
space:
mode:
authorGravatar Sadie Powell2022-02-05 23:40:40 +0000
committerGravatar Sadie Powell2022-02-05 23:40:40 +0000
commit2b2a3a31d7b6c8415edc3156a19e42b832e7a957 (patch)
treea2bba51b3ac5bbbc6c961ef02036c781105ec02e /src/modules/m_permchannels.cpp
parentSquash an unnecessary string copy in SQL::Error. (diff)
Add an option to allow channel ops to enable the permchannels mode.
Closes #1964.
Diffstat (limited to 'src/modules/m_permchannels.cpp')
-rw-r--r--src/modules/m_permchannels.cpp6
1 files changed, 6 insertions, 0 deletions
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())