From e50d016aa23083f81dcf181f68edb81c5b23c78d Mon Sep 17 00:00:00 2001 From: danieldg Date: Sun, 18 Oct 2009 02:57:46 +0000 Subject: Cull channels, warn when Extensible objects are not culled as they must be git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11901 e03df62e-2008-0410-955e-edbf42e46eb7 --- src/users.cpp | 30 +----------------------------- 1 file changed, 1 insertion(+), 29 deletions(-) (limited to 'src/users.cpp') diff --git a/src/users.cpp b/src/users.cpp index 542a6e565..665f1d908 100644 --- a/src/users.cpp +++ b/src/users.cpp @@ -1708,35 +1708,7 @@ void User::PurgeEmptyChannels() { Channel* c = *f; c->RemoveAllPrefixes(this); - if (c->DelUser(this) == 0) - { - /* No users left in here, mark it for deletion */ - try - { - to_delete.push_back(c); - } - catch (...) - { - ServerInstance->Logs->Log("USERS", DEBUG,"Exception in User::PurgeEmptyChannels to_delete.push_back()"); - } - } - } - - for (std::vector::iterator n = to_delete.begin(); n != to_delete.end(); n++) - { - Channel* thischan = *n; - chan_hash::iterator i2 = ServerInstance->chanlist->find(thischan->name); - if (i2 != ServerInstance->chanlist->end()) - { - ModResult MOD_RESULT; - FIRST_MOD_RESULT(OnChannelPreDelete, MOD_RESULT, (i2->second)); - if (MOD_RESULT == MOD_RES_DENY) - continue; // delete halted by module - FOREACH_MOD(I_OnChannelDelete,OnChannelDelete(i2->second)); - delete i2->second; - ServerInstance->chanlist->erase(i2); - this->chans.erase(*n); - } + c->DelUser(this); } this->UnOper(); -- cgit v1.2.3