summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/userprocess.cpp4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/userprocess.cpp b/src/userprocess.cpp
index d66e548c9..4fcf87f66 100644
--- a/src/userprocess.cpp
+++ b/src/userprocess.cpp
@@ -142,9 +142,11 @@ void InspIRCd::DoBackgroundUserStuff()
/*
* loop over all local users..
*/
- for (std::vector<User*>::iterator count2 = this->Users->local_users.begin(); count2 != this->Users->local_users.end(); count2++)
+ std::vector<User*>::reverse_iterator count2 = this->Users->local_users.rbegin();
+ while (count2 != this->Users->local_users.rend())
{
User *curr = *count2;
+ count2++;
if (curr->quitting)
continue;