diff options
| author | 2022-02-05 23:40:40 +0000 | |
|---|---|---|
| committer | 2022-02-05 23:40:40 +0000 | |
| commit | 2b2a3a31d7b6c8415edc3156a19e42b832e7a957 (patch) | |
| tree | a2bba51b3ac5bbbc6c961ef02036c781105ec02e /src/modules/m_permchannels.cpp | |
| parent | Squash 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.cpp | 6 |
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()) |
