]> git.netwichtig.de Git - user/henk/code/inspircd.git/commitdiff
Delete channel on -P if usercount is 0, fixes part of #565
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 12 Jul 2008 10:11:13 +0000 (10:11 +0000)
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>
Sat, 12 Jul 2008 10:11:13 +0000 (10:11 +0000)
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9966 e03df62e-2008-0410-955e-edbf42e46eb7

src/modules/m_permchannels.cpp

index 304192ca820854f48d48e5622bcaf57410b77039..86e810bc29d3b149da175777e4a8b5df2e61d0d3 100644 (file)
@@ -38,6 +38,9 @@ class PermChannel : public ModeHandler
                        if (channel->IsModeSet('P'))
                        {
                                channel->SetMode('P',false);
+
+                               if (channel->GetUserCounter() == 0)
+                                       delete channel;
                                return MODEACTION_ALLOW;
                        }
                }