]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Merge pull request #1321 from SaberUK/insp20+permwarn
authorAttila Molnar <attilamolnar@hush.com>
Wed, 17 May 2017 21:47:27 +0000 (23:47 +0200)
committerGitHub <noreply@github.com>
Wed, 17 May 2017 21:47:27 +0000 (23:47 +0200)
[2.0] Warn when a user configures a permanent channel without +P.

src/modules/m_permchannels.cpp

index e86b3cbf6d171dece2453c8e50e110680ad9c980..74a798356c1a67b8cf05aac577932d9d0afbb11e 100644 (file)
@@ -298,6 +298,12 @@ public:
 
                                ServerInstance->Logs->Log("m_permchannels", DEBUG, "Added %s with topic %s", channel.c_str(), topic.c_str());
 
+                               if (modes.find('P') == std::string::npos)
+                               {
+                                       ServerInstance->Logs->Log("m_permchannels", DEFAULT, "%s (%s) does not have +P set in <permchannels:modes>; it will be deleted when empty!",
+                                               c->name.c_str(), tag->getTagLocation().c_str());
+                               }
+
                                if (modes.empty())
                                        continue;