From 288f9406b57fd44af4480207faa1780226352b6d Mon Sep 17 00:00:00 2001 From: w00t Date: Sat, 12 Jul 2008 10:11:13 +0000 Subject: Delete channel on -P if usercount is 0, fixes part of #565 git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@9966 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/modules/m_permchannels.cpp | 3 +++ 1 file changed, 3 insertions(+) (limited to 'src') diff --git a/src/modules/m_permchannels.cpp b/src/modules/m_permchannels.cpp index 304192ca8..86e810bc2 100644 --- a/src/modules/m_permchannels.cpp +++ b/src/modules/m_permchannels.cpp @@ -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; } } -- cgit v1.2.3