diff options
| author | 2009-09-21 18:42:47 +0000 | |
|---|---|---|
| committer | 2009-09-21 18:42:47 +0000 | |
| commit | 3400b094ef19fc8fc1eae6d12fb33667cd5629b9 (patch) | |
| tree | bbb61ba9c372e60c7ca3287c7710b524ec8b471b /src/cull_list.cpp | |
| parent | Don't try to write to dead users, add debug to SquitServer, and remove a stri... (diff) | |
Allow objects to be added to cull list during apply - fixes user deletion on netsplit
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@11754 e03df62e-2008-0410-955e-edbf42e46eb7
Diffstat (limited to 'src/cull_list.cpp')
| -rw-r--r-- | src/cull_list.cpp | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/src/cull_list.cpp b/src/cull_list.cpp index 35fa44bfa..c45dff46c 100644 --- a/src/cull_list.cpp +++ b/src/cull_list.cpp @@ -18,12 +18,13 @@ void CullList::Apply() { - for(std::set<classbase*>::iterator i = list.begin(); i != list.end(); i++) + std::vector<classbase*> todel(list.begin(), list.end()); + list.clear(); + for(std::vector<classbase*>::iterator i = todel.begin(); i != todel.end(); i++) { classbase* c = *i; c->cull(); delete c; } - list.clear(); } |
