From f0552b8d7611a17b6d6da11a355cf3f84a9d00b9 Mon Sep 17 00:00:00 2001 From: danieldg Date: Mon, 2 Mar 2009 04:23:22 +0000 Subject: 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 --- src/users.cpp | 4 ++++ 1 file changed, 4 insertions(+) (limited to 'src') diff --git a/src/users.cpp b/src/users.cpp index 0324fad7f..493f44bc0 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -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); -- cgit v1.2.3