From: w00t Date: Sat, 12 Jul 2008 10:11:13 +0000 (+0000) Subject: Delete channel on -P if usercount is 0, fixes part of #565 X-Git-Tag: v2.0.23~2973 X-Git-Url: https://git.netwichtig.de/gitweb/?a=commitdiff_plain;h=288f9406b57fd44af4480207faa1780226352b6d;p=user%2Fhenk%2Fcode%2Finspircd.git 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 --- 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; } }