aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGravatar Peter Powell2017-04-11 23:13:26 +0100
committerGravatar Peter Powell2017-04-14 15:25:15 +0100
commitdbca69da29633abd79ff8ce546d5e2b2b4c43d04 (patch)
tree550d60a4ed80f56b29192ff3c89d2b5ed1bb902b
parentMerge pull request #1311 from SaberUK/master+mm-cleanup (diff)
Automatically apply +P to all permanent channels.
-rw-r--r--docs/conf/modules.conf.example1
-rw-r--r--src/modules/m_permchannels.cpp4
2 files changed, 4 insertions, 1 deletions
diff --git a/docs/conf/modules.conf.example b/docs/conf/modules.conf.example
index 835e31795..33da80c56 100644
--- a/docs/conf/modules.conf.example
+++ b/docs/conf/modules.conf.example
@@ -1434,7 +1434,6 @@
#<include file="permchannels.conf">
#
# You may also create channels on startup by using the <permchannels> block.
-# Don't forget to set them +P in the modes, or they won't stay permanent.
#<permchannels channel="#opers" modes="isP" topic="Opers only.">
#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#-#
diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp
index 9e77bd60e..d514e62a5 100644
--- a/src/modules/m_permchannels.cpp
+++ b/src/modules/m_permchannels.cpp
@@ -244,6 +244,10 @@ public:
mode->OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, c, par, true);
}
}
+
+ // We always apply the permchannels mode to permanent channels.
+ par.clear();
+ p.OnModeChange(ServerInstance->FakeClient, ServerInstance->FakeClient, c, par, true);
}
}
}