Fix +P channels being deleted when the final user /QUITs, thanks SnoFox

git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11161 e03df62e-2008-0410-955e-edbf42e46eb7
This commit is contained in:
danieldg 2009-03-02 04:23:22 +00:00
parent 789e43b40d
commit f0552b8d76

View File

@ -1964,6 +1964,10 @@ void User::PurgeEmptyChannels()
chan_hash::iterator i2 = ServerInstance->chanlist->find(thischan->name);
if (i2 != ServerInstance->chanlist->end())
{
int MOD_RESULT = 0;
FOREACH_RESULT_I(ServerInstance,I_OnChannelPreDelete, OnChannelPreDelete(i2->second));
if (MOD_RESULT == 1)
continue; // delete halted by module
FOREACH_MOD(I_OnChannelDelete,OnChannelDelete(i2->second));
delete i2->second;
ServerInstance->chanlist->erase(i2);