summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-15 15:32:22 +0000
committerw00t <w00t@e03df62e-2008-0410-955e-edbf42e46eb7>2008-01-15 15:32:22 +0000
commit2cd906702d67862591d5ba57a3da16ec22177b1d (patch)
tree3c1f36144539685975f6d6a51d7733a8999f7a0e
parent130f5c44d723db841444c9becd71464b81145c3d (diff)
CullList: Don't try quit everyone. Speed/resource use enhancement on netsplits..
git-svn-id: http://svn.inspircd.org/repository/trunk/inspircd@8711 e03df62e-2008-0410-955e-edbf42e46eb7
-rw-r--r--src/cull_list.cpp4
-rw-r--r--src/inspircd.cpp6
2 files changed, 6 insertions, 4 deletions
diff --git a/src/cull_list.cpp b/src/cull_list.cpp
index 594df946c..66fd9f2d9 100644
--- a/src/cull_list.cpp
+++ b/src/cull_list.cpp
@@ -107,7 +107,9 @@ void CullList::MakeSilent(User* user)
int CullList::Apply()
{
int n = list.size();
- while (list.size())
+ int i = 0;
+
+ while (list.size() && i++ != 100)
{
std::vector<CullItem>::iterator a = list.begin();
diff --git a/src/inspircd.cpp b/src/inspircd.cpp
index 4ca4c50d6..8b56706dd 100644
--- a/src/inspircd.cpp
+++ b/src/inspircd.cpp
@@ -625,6 +625,9 @@ int InspIRCd::Run()
*/
if (TIME != OLDTIME)
{
+ /* if any users were quit, take them out */
+ this->GlobalCulls.Apply();
+
if (TIME < OLDTIME)
{
WriteOpers("*** \002EH?!\002 -- Time is flowing BACKWARDS in this dimension! Clock drifted backwards %d secs.",abs(OLDTIME-TIME));
@@ -674,9 +677,6 @@ int InspIRCd::Run()
*/
this->SE->DispatchEvents();
- /* if any users was quit, take them out */
- this->GlobalCulls.Apply();
-
/* If any inspsockets closed, remove them */
this->BufferedSocketCull();