summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-02 04:23:22 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-03-02 04:23:22 +0000
commitf0552b8d7611a17b6d6da11a355cf3f84a9d00b9 (patch)
treeee56a249e5c7a1d442336d19cf675d9e7e4fcbfe /src/users.cpp
parent789e43b40dc9cef09e9a987dc003ffb8dcdea096 (diff)
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
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp4
1 files changed, 4 insertions, 0 deletions
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);