diff options
author | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-23 19:21:22 +0000 |
---|---|---|
committer | w00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7> | 2008-10-23 19:21:22 +0000 |
commit | d0a7ed880df022ef7b41c36c74099cd2790c3462 (patch) | |
tree | b643ffd691d9d3558890c52e51a041612a292c78 | |
parent | 164998f1e6e2cb885fb4d630ded29ed5191218c8 (diff) |
Add/document channels/set-permanent priv, and tie setting of +P to it.
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@10692 e03df62e-2008-0410-955e-edbf42e46eb7
-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); |