summaryrefslogtreecommitdiff
path: root/src/users.cpp
diff options
context:
space:
mode:
authordanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-18 02:57:46 +0000
committerdanieldg <danieldg@e03df62e-2008-0410-955e-edbf42e46eb7>2009-10-18 02:57:46 +0000
commite50d016aa23083f81dcf181f68edb81c5b23c78d (patch)
tree2f627c4d456ec360a05c013832142df187e193d6 /src/users.cpp
parent93a78a57ada6d5dab410c2bd3c4b02f4fa15684c (diff)
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
Diffstat (limited to 'src/users.cpp')
-rw-r--r--src/users.cpp30
1 files changed, 1 insertions, 29 deletions
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<Channel*>::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();