diff options
-rw-r--r-- | conf/opers.conf.example | 3 | ||||
-rw-r--r-- | src/modules/m_permchannels.cpp | 3 |
2 files changed, 5 insertions, 1 deletions
diff --git a/conf/opers.conf.example b/conf/opers.conf.example index 898a318c7..cc085f53c 100644 --- a/conf/opers.conf.example +++ b/conf/opers.conf.example @@ -25,7 +25,8 @@ # ACTIONS # - users/mass-message: allows opers with this priv to PRIVMSG and NOTICE to a server mask (e.g. NOTICE $*) # - channels/high-join-limit: allows opers with this priv to join <channels:opers> total channels instead of <channels:users> total channels. - privs="users/auspex channels/auspex servers/auspex users/mass-message channels/high-join-limit" + # - channels/set-permanent: allows opers with this priv to set +P on channels with m_permchannels. + privs="users/auspex channels/auspex servers/auspex users/mass-message channels/high-join-limit channels/set-permanent" # usermodes: Oper-only usermodes that opers with this class can use. usermodes="*" diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 3b3df4d26..207093e0e 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -27,6 +27,9 @@ class PermChannel : public ModeHandler { if (adding) { + if (!source->HasPrivPermission("channels/set-permanent")) + return MODEACTION_DENY; + if (!channel->IsModeSet('P')) { channel->SetMode('P',true); |