summaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-12 10:11:13 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-07-12 10:11:13 +0000
commit288f9406b57fd44af4480207faa1780226352b6d (patch)
tree74abf475a4d59ab69756d7bde265e9fa2b45d70b /src/modules
parent8096138d9a5d809f064090a82783d424be3d64b1 (diff)
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
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/m_permchannels.cpp3
1 files changed, 3 insertions, 0 deletions
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;
}
}