aboutsummaryrefslogtreecommitdiffstats
path: root/src/modules/m_permchannels.cpp
diff options
context:
space:
mode:
authorGravatar w00t2008-07-12 10:11:13 +0000
committerGravatar w00t2008-07-12 10:11:13 +0000
commit288f9406b57fd44af4480207faa1780226352b6d (patch)
tree74abf475a4d59ab69756d7bde265e9fa2b45d70b /src/modules/m_permchannels.cpp
parentFix for bug #541: /taxonomy reporting metadata for incorrect user. Can someon... (diff)
downloadinspircd++-288f9406b57fd44af4480207faa1780226352b6d.tar.gz
inspircd++-288f9406b57fd44af4480207faa1780226352b6d.tar.bz2
inspircd++-288f9406b57fd44af4480207faa1780226352b6d.zip
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/m_permchannels.cpp')
-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;
}
}